Using Smart View SDK, send a content URL to a DMP(Default Media Player) app available on 2015, 2016 Samsung TVs(and will be expanded to 14 TVs later). Any non-DRM content supported by the HTML5 Video,Audio,Image is supported to watch in a basic player with a fixed UI.
Default Media Player 2.0 (DMP 2.0)
Check Smart View SDK UX guideline for implementing DMP2.0
Various message Listeners have been added to the SDK.
Create an object of OnVideoPlayerListener / OnAudioPlayerListener / OnPhotoPlayerListener and register it using addOnMessageListener() to get the events, as and when, an event is triggered on TV.
Following are events supported by VideoPlayer / AudioPlayer / PhotoPlayer class.
VideoPlayer
Listener
Description
onBufferingStart()
Notify start of buffering.
onBufferingComplete()
Notify completion of buffering.
onBufferingProgress(int progress)
Notify current buffering progress in percentage.
onCurrentPlayTime(int progress)
Notify current video/audio play time in milliseconds.
onStreamingStarted(int duration)
Notify start of video/audio streaming.
onStreamCompleted()
Notify completion of video/audio streaming.
onPlayerInitialized()
Notification for default media player(DMP) initialization completion on TV.
onPlayerChange(String playerType)
Notification for change of player on TV. (e.g. from audio player to photo player).
onPlay()
Notify play video/audio/photo event.
onPause()
Notify pause video/audio/photo event.
onStop()
Notify stop video/audio/photo event.
onForward()
Notify forward video event.
onRewind())
Notify rewind video event.
onMute()
Notify mute TV volume event.
onUnMute()
Notify unmute TV volume event.
onVolumeChange()
Notify change in volume level.
onControlStatus(int volLevel)
Notification received when getControlStatus() is called.
onNext()
Notify next video/audio/photo event.
onPrevious()
Notify previous video/audio/photo event.
onAddToList(JSONObject enqueuedItem)
Notification received when an item is added to the list.
onRemoveFromList (JSONObject dequeuedItem)
Notification received when an item is removed from the list.
onClearList()
Notification received when a request is sent to clear the list on TV.
onGetList(JSONArray queueList)
Notification received when a request is sent to fetch the list from TV.
DMP allows developers to show standby-screen(s) and watermarks on DMP application, while content is being casted from mobile application.
Standby-screen is a splash screen shown to the user while they connect to TV. This screen may comprise of either application logo or any other information related to application. Developer may choose to provide up-to 3 images in standby-screen mode. If no standby images are provided, default DMP logo will be shown to the user with app’s connection status.
Watermark will be shown on top-right corner of the display area while the content is being casted on the TV. Ideal size for a watermark image is 150 (width) X 50 (height). Orientation, position & size of the watermark cannot be changed. If a larger image is provided, the image will be scaled to fit the watermark display area.
Following APIs are available for the developers to show their standby screen images & watermark images.
standbyConnect(Uri bgImageUrl1, Uri bgImageUrl2, Uri bgImageUrl3, Result<boolean> result)
This API establishes connection with TV and shows provided splash-screen(s) on the TV.
ImportantThis API shall be used when user has made the TV selection (i.e. after fetching Service object & before first call to PlayContent() API). This API won’t work if content has already been casted from the application.
ImportantThis API should only be used after DMP has loaded on the TV, i.e. on or after onPlayerInitialized() callback.
removePlayerWatermark()
Example Android API usage:
mAudioPlayer.removePlayerWatermark();
Error Code
Following are the default media player specific errors for different type of error strings:
Name
Code
Description
PLAYER_ERROR_UNKNOWN
100
Unknown error
PLAYER_ERROR_GENEREIC
101
Generic error
PLAYER_ERROR_CONNECTION_FAILED
102
Network issue
PLAYER_ERROR_AUDIO_CODEC_NOT_SUPPORTED
103
Audio codec not supported
PLAYER_ERROR_NOT_SUPPORTED_FILE
104
File format not supported
PLAYER_ERROR_VIDEO_CODEC_NOT_SUPPORTED
105
Video codec not supported
PLAYER_ERROR_PLAYER_NOT_LOADED
106
Player is not yet loaded or different player is loaded on TV
PLAYER_ERROR_INVALID_OPERATION
107
Invalid operation
PLAYER_ERROR_INVALID_PARAMETER
108
Called on invalid operation
PLAYER_ERROR_NO_SUCH_FILE
109
No such file found
PLAYER_ERROR_SEEK_FAILED
110
Fail to perform seek to operation
PLAYER_ERROR_REWIND
111
Error in rewind
PLAYER_ERROR_FORWARD
112
Error in forward
PLAYER_ERROR_RESTORE
113
Fail to restore the player
PLAYER_ERROR_RESOURCE_LIMIT
114
Resource max limit reached
PLAYER_ERROR_INVALID_STATE
115
Player invalid state
PLAYER_ERROR_NO_AUTH
116
Not authorized to play the requested content
PLAYER_ERROR_LAST_CONTENT
117
Can’t Dequeue last content from the list
PLAYER_ERROR_CURRENT_CONTENT
118
Can’t Dequeue current contentfrom the list
PLAYER_ERROR_INVALID_URI
401
Invalid URL
PLAYER_ERROR_INTERNAL_SERVER
500
Internal server error
PLAYER_ERROR_INVALID_TV_RESPONSE
300
Either there is an APPID mismatch or library received data as null (Library specific error)
Following are the Speaker specific errors for different type of error Message:
Message
You aborted the audio playback
A network error caused the audio download to fail
The audio playback was aborted due to a corruption problem or because the audio used features your browser did not support
An unknown error occurred
Registration
Important'DMP' submisison will be open in early Oct. Until then, please enter the word ‘DMP’ in the ‘Cloud URL’ field, instead.
You must check the 'DMP' checkbox when you submit your application using DMP.
We recommend you to submit you mobile app on Seller office
There is no approval process required to use the DMP, but your mobile app can be tested for basic features and any problems or suggestions will be notified via Seller office.
Sample Application
Please view the source code in DefaultMediaPlayer2.0 to understand the basic workflow when using the SDK.
We use cookies to improve your experience on our website and to show you relevant
advertising. Manage you settings for our cookies below.
Essential Cookies
These cookies are essential as they enable you to move around the website. This
category cannot be disabled.
Company
Domain
Samsung Electronics
.samsungdeveloperconference.com
Analytical/Performance Cookies
These cookies collect information about how you use our website. for example which
pages you visit most often. All information these cookies collect is used to improve
how the website works.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Functionality Cookies
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and
tailor the website to provide enhanced features and content for you.
Company
Domain
LinkedIn
.ads.linkedin.com, .linkedin.com
Advertising Cookies
These cookies gather information about your browser habits. They remember that
you've visited our website and share this information with other organizations such
as advertisers.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Preferences Submitted
You have successfully updated your cookie preferences.