Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTMP logging error #53

Closed
sarat1669 opened this issue Jul 29, 2016 · 6 comments
Closed

RTMP logging error #53

sarat1669 opened this issue Jul 29, 2016 · 6 comments

Comments

@sarat1669
Copy link

Clapper player : 0.2.58
rtmp version : 0.13

log.js:67[error][t] error on event o13:progress trigger - TypeError: this.el.getBytesLoaded is not a function(…)
log.js:67[error][t] error on event o13:progress trigger - TypeError: this.el.getBytesLoaded is not a function(…)
log.js:67[error][t] error on event o13:progress trigger - TypeError: this.el.getBytesLoaded is not a function(…)
log.js:67[error][t] error on event o13:progress trigger - TypeError: this.el.getBytesLoaded is not a function(…)
log.js:67[error][t] error on event o13:progress trigger - TypeError: this.el.getBytesLoaded is not a function(…)
log.js:67[error][t] error on event o13:progress trigger - TypeError: this.el.getBytesLoaded is not a function(…)
...

The video is playing fine but i keep getting these logs

@flavioribeiro
Copy link
Member

@sarat1669 can you check if the progress bar is working fine? can you send me a link where this bug is reproducible?

@sarat1669
Copy link
Author

sarat1669 commented Jul 29, 2016

That is a live stream and the progress bar is at 100%. Here is the code that i am using. I removed the rtmp stream intentionally.

var player= []
    var changeVideo = function(videoURL, parentId){ 
        if(player[parentId]!=undefined) player[parentId].destroy();
        player[parentId] = new Clappr.Player({
            source: videoURL,
            parentId: '#'+parentId,
            plugins: {'playback': [RTMP]},
            rtmpConfig: {
                swfPath: 'RTMP.swf',
                scaling:'stretch',
                playbackType: 'live',
                bufferTime: 1,
                startLevel: 0,
            },
            autoPlay: true
        });
        player[parentId].play()
        player[parentId].listenTo(
            player[parentId].core.getCurrentContainer(),
            Clappr.Events.FRAG_LOADED,
            function(e,s) {
                console.log(e);
                console.log(s)
            }
        )
        return player[parentId]
    }
    changeVideo("rtmp://XXXXXXXXXXXXXXXXXXXXXXXXX", "player")

@gfronza
Copy link
Collaborator

gfronza commented Aug 2, 2016

That's weird, because the getBytesLoaded exists: https://github.com/flavioribeiro/clappr-rtmp-plugin/blob/master/src/RTMP.as#L128

Is there any chance you have the RTMP.swf cached in your browser (the previous version of RTMP.swf didn't have that function).

@sarat1669
Copy link
Author

sarat1669 commented Aug 2, 2016

This is the only version that i have used. I think getBytesTotal is not valid for live streams. I made the following changes that fixed this error. I chose 100 so that the progress bar is always to the right end.

        if(this._playbackType === _playback2.default.LIVE){
            this.trigger(_events2.default.PLAYBACK_PROGRESS, {
              start: 0,
              current: 100,
              total: 100
            });
          } else {
            this.trigger(_events2.default.PLAYBACK_PROGRESS, {
              start: 0,
              current: this.el.getBytesLoaded(),
              total: this.el.getBytesTotal()
            });
          }

If its the wrong thing to do, please let me know how to fix that.

@gfronza
Copy link
Collaborator

gfronza commented Aug 2, 2016

@sarat1669 I tested here, calling el.getBytesLoaded in a live stream it returns 0. To go any further we'll need a link of your "app" where this problem can be reproduced.

@ocramot
Copy link

ocramot commented Sep 19, 2016

Same as #23

The missing functions (getBytesLoaded and getBytesTotal) were added in 6 July: e4d053b

However the url http://cdn.jsdelivr.net/clappr.rtmp/latest/rtmp.min.js is still pointing to an old version of the plugin. So either you have to build the plugin yourself, or wait for someone to build and update the latest version.

EDIT: I actually tried to rebuild from source and I in fact found the same file found in the "latest" link, without the two missing functions. So either I did something wrong recompiling, or there is something else that is missing in order to include those two functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants