This topic describes how to play videos seamlessly on a Samsung TV.
Samsung TVs support seamless video playback, enabling you to play several videos one after another.
There are 2 modes for seamless video playback:
Single mode video playback
Mixer mode video playback
Single Mode Video Playback
This mode can be used when you want to play videos seamlessly in a single frame. This can be achieved using the AVPlay API.
To use the setVideoStillMode() method with true:
This parameter holds the last frame of the video to be shown until playback starts again. This is applicable if you want to use 2 different videos (played sequentially) using seamless playback.
webapis.avplaystore.setVideoStillMode("true");
To use the setVideoStillMode() method with false:
This parameter disables still mode until it is enabled again.
The AVPlay API supports only HTTP streaming (.mp4).
Maximum 60fps is supported.
You are recommended to use same resolution and same FPS contents for seamless video switching.
UHD seamless playback is supported in single mode.
Only 1 video is displayed on the screen.
Mixer Mode Video Playback
This mode can be used when you need to play videos on 2 separate display rectangles on a single screen (1920x1080). You can play 2 playlists in a seamless manner when using this mode.
A maximum 2 videos can output on a single display.
A composite video frame is created by mixing 2 video frames together.
Only a single audio track, belonging to the first player, is played.
Figure 1. Mixer mode with 2 video player instances
To enable mixer mode using setStreamingProperty() with USE_VIDEOMIXER property:
This method must be called before prepare() is called and the SET_MIXEDFRAME property is set.
The following call sequence is for 2 video areas which can play videos in seamless mode.
Sample code for 2 videos:
try {
var player1 = webapis.avplaystore.getPlayer();
var player2 = webapis.avplaystore.getPlayer();
player1.open(url1);
player2.open(url2);
// listener1 can be used for switching videos in seamless manner related to playlist1
player1.setListener(listener1);
// listener2 can be used for switching videos in seamless manner related to playlist2
player2.setListener(listener2);
player1.setStreamingProperty("USE_VIDEOMIXER");
player2.setStreamingProperty("USE_VIDEOMIXER");
player1.setDisplayRect(0, 0, 960,540);
player2.setDisplayRect(960,540,960,540);
player1.prepare();
player2.prepare();
player1.setStreamingProperty("SET_MIXEDFRAME");
player2.setStreamingProperty("SET_MIXEDFRAME");
player1.play();
player2.play();
} catch (e) {
console.log(e);
}
Sample code for 1 video:
try {
var player1 = webapis.avplaystore.getPlayer();
player1.open(url1);
player1.setListener(listener1);
// listener1 can be used for switching videos in seamless manner related to playlist1
player1.setStreamingProperty("USE_VIDEOMIXER");
player1.setDisplayRect(0, 0, 960,540);
player1.prepare();
player1.setStreamingProperty("SET_MIXEDFRAME");
player1.setDisplayRotation("PLAYER_DISPLAY_ROTATION_90"); // To play portrait content
player1.play();
} catch (e) {
console.log(e);
}
Note
The AVPlay API supports only HTTP streaming. (.mp4)
Maximum 30fps is supported.
UHD content is not supported in mixer mode.
A maximum 4 AVPlayStore instances can be created at a time.
Manage Your Cookies
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.