p2p-media-loader icon indicating copy to clipboard operation
p2p-media-loader copied to clipboard

P2p Novage does not load

Open ualeci opened this issue 2 years ago • 1 comments

I have a novage p2p system, which on my android phone the app opens ok the video. however when installing on a TV Box, it is black screen and does not display anything or error.

Has anyone had similar problems?

Codigo player.php

<script src="../core/p2p-media-loader-core.js"></script>
<script src="../core/p2p-media-loader-hlsjs.js"></script>
<style>
	

body{ margin: 0; background-color: #000000; }

</style>
<div id="video"></div>

<script>

var testPlugin = Clappr.UICorePlugin.extend({
	name: 'test_plugin',
	
	bindEvents: function () {
		this.listenToOnce(this.core, Clappr.Events.CORE_READY, function () {
			this.listenTo(this.core.mediaControl, 
			  Clappr.Events.MEDIACONTROL_SHOW, function() { 
			    console.log("show") 
				Android.mediaControlsShowing(); 
			  });
			  this.listenTo(this.core.mediaControl, Clappr.Events.MEDIACONTROL_HIDE, function() { 
				console.log("hide")
				Android.mediaControlsHide(); 
			  });
		});
	},
	unBindEvents: function(){
	  this.stopListening(this.core.mediaControl, Clappr.Events.MEDIACONTROL_SHOW);
	  this.stopListening(this.core.mediaControl, Clappr.Events.MEDIACONTROL_HIDE);
	},
	 reload: function () {
		this.unBindEvents();
		this.bindEvents();
	},
});

	
	var deviceWidth = $(window).width(); 
	var deviceHeight = $(window).height();
			
    if (p2pml.hlsjs.Engine.isSupported()) {
        var engine = new p2pml.hlsjs.Engine();

        var player = new Clappr.Player({
            parentId: "#video",
            source: <?php echo "'" . $link . "'"; ?>,
			width: deviceWidth,
            height: deviceHeight,
			watermark: <?php echo "'" . $marca . "'"; ?>,
			playback: {
                hlsjsConfig: {
                    liveSyncDurationCount: 3, // To have at least 7 segments in queue
                    loader: engine.createLoaderClass()
                }
            },
		    plugins: [testPlugin]
        });
        p2pml.hlsjs.initClapprPlayer(player);
        player.setVolume(100); // 1%
        player.play(true);
        player.play();
		
    } else {
        document.write("Not supported :(");
    }

</script>

ualeci avatar Mar 31 '22 13:03 ualeci

Can you explain what you mean by "TV Box"?

If it is an embedded browser, its possible it may have no WebRTC support, or any of the other web standards which are needed

ckcr4lyf avatar Apr 01 '22 02:04 ckcr4lyf