Closed cherihung closed 4 years ago
I've noticed this issue as well. Seems like a pretty huge issue.
I dug a little deeper. The problem is that if you pause and then resume, the stream status is paused
.
Here's a concrete reproduction. You just need to throw this HTML on a server alongside locomote.min.js
and Player.swf
.
<html>
<head>
<title>Locomote</title>
<style type="text/css">
#player {
width: 320px;
height: 240px;
}
</style>
<script src="locomote.min.js"></script>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
console.log('dom loaded');
var locomote = new Locomote('player', 'Player.swf');
locomote.on('apiReady', function() {
console.log('about to play');
locomote.play('rtmp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov');
});
locomote.on('streamStarted', function() {
console.log('stream has started');
});
locomote.on('error', function(err) {
console.log(err);
});
setTimeout(function() {
console.log('pausing');
locomote.pause();
setTimeout(function() {
console.log('resuming');
locomote.resume();
setTimeout(function() {
console.log('Stream status should be "playing" but instead is: "' + locomote.streamStatus().state + '"');
}, 2000);
}, 2000);
}, 2000);
});
</script>
</head>
<body>
<div id="player" class="player"></div>
</body>
</html>
@drowzy I'd love to work on a fix here - any pointers?
I am playing with this plugin now, playing a flv file locally via http. It's not a real live stream. The bug I encountered is this:
It feels like a bug but is it one that would be moot for use on live stream video? My purpose ultimately is to use this plugin for stream RSTP video. I'm simply testing with a local file for style and other dev purpose.