Embed Player - Duplicate Video

Max

Administrator
Staff member
Good day.
With layout fixes from this post, we cannot reproduce this issue.
You can also wait for us to implement desktop layout customizing in ticket WCS-2752, we raised its priority and already working on it.
 

smartbet

New Member
This issue happening when calling onStopped method when session established it recreates another video tag by calling playStream(session); i fixed this part by changing player code
JavaScript:
if ( Flashphoner.getSessions().length > 0 ) {
          session = Flashphoner.getSessions()[0];
          if ( session.getServerUrl().toString() === url.toString() ) {
            if ( session.getStreams() && session.getStreams().length > 0 ) {
              if ( session.getStreams()[0].status() !== 'PLAYING' ) {
                if ( session.getStreams()[0].status() === 'NEW' ) {
                  session.getStreams()[0].play();
                  return;
                }
              }
            }
            return;
          } else {
            //remove session DISCONNECTED and FAILED callbacks
            session.on(SESSION_STATUS.DISCONNECTED, () => {
            });
            session.on(SESSION_STATUS.FAILED, () => {
            });
            session.disconnect();
          }
        }
those detects if player is active an playing or not.
 

Max

Administrator
Staff member
Yeah, we can reproduce it here too, in the same way.
@Max, can you check please?
We cannot reproduce it on our demo server with Embed Player example "out-of-the-box"
Below the steps we've done:
1. Publish test stream using Media Devices example (to set different publishing resolutions)
1594956473809.png

2. Play test stream in Embed Player
1594956543137.png

Code:
<iframe id='fp_embed_player' src='https://demo.flashphoner.com:8888/embed_player?urlServer=wss://demo.flashphoner.com:8443&streamName=test&mediaProviders=WebRTC' marginwidth='0' marginheight='0' frameborder='0' width='100%' height='100%' scrolling='no' allowfullscreen='allowfullscreen'></iframe>
3. Periodically press stop/play button
So please confirm the issue can be reproduced on our demo server. If not, please take Embed Player example and modify its code minimally to reproduce the issue then provide us the code using this link, we will check.
 
Top