Search code examples
html5-videohttp-live-streamingsamsung-smart-tv

Screen flashes when switching from one video file to another


I have a simple Samsung Smart TV app that plays a series of video clips from the internet.

When streaming the first clip over HLS using the Samsung specific player component, the video plays correctly in its allotted frame on screen.

At the end of the clip (in response to the onRenderingComplete event), I call Stop() on the clip followed by a request to play the next one.

If the next one is a standard MP4 file, the entire screen flashes before playback begins. However, if it's another HLS stream, playback is fine.

Has anyone else experienced this issue and, if so, did you manage to fix it?

The code for the onRenderingComplete handler is very simple, as shown below:

Player.onRenderingComplete = function() {
    // Stop the player plugin to reset it    
    this.plugin.Stop();

    // Cue up the next video
    this.plugin.Play("<url>");
}

Solution

  • Yes. This is common for Samsung devices. Even Samsung's video example in documentation has this problem.

    The only way I have managed it is to use the same video codecs, best if it has 25fps.