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

Video element has big current time value in a controls bar #125

Open
cupuyc opened this issue Nov 22, 2017 · 3 comments
Open

Video element has big current time value in a controls bar #125

cupuyc opened this issue Nov 22, 2017 · 3 comments
Assignees

Comments

@cupuyc
Copy link

cupuyc commented Nov 22, 2017

I use new red5prosdk.RTCPublisher(); on my page with

<video id="red5pro-publisher" width="640" height="480" controls muted autoplay class="video"></video>

When I see camera, I also see video current time value: 46:33:26. This value should not be such big, because I just created stream with random name and even not published it.
default

Please suggest how to set that value to zero or more realistic (started counting from zero).

@beetlejesss
Copy link
Contributor

I think that for the publisher this may reflect the time that the server has been running. @bustardcelly might be able to better respond to where this value is coming from.

@bustardcelly
Copy link
Contributor

I believe you are correct @beetlejesss.

@cupuyc it should be noted that the Red5 Pro HTML SDK does not provide custom controls for broadcasts. This is the default Chrome display controls for a live broadcast.

Each browser displays their own custom controls for live broadcasts in the video and audio elements:

safari:
live_safari

firefox:
live_firefox

Safari recognizes it as a "Live" event, most likely because the duration value is coming in as Infinity.

Firefox starts counting up the time once the video element is presented in the DOM.

Not entirely sure how/where Chrome gets the time for its display - as @beetlejesss it may the time since the server has been alive.


You may not need to display the controls for publishers. If that is not a requirement, you can just remove the controls attribute from the video element declaration.

If you need the controls for live broadcast, I have not found a way to reset that time value. It is the currentTime property of the media element. Since it is a live event, it continually is being overwritten.

@cupuyc cupuyc changed the title Video element has big value. Video element has big current time value in a controls bar Nov 23, 2017
@cupuyc
Copy link
Author

cupuyc commented Nov 23, 2017

OK.
Thanks for the clarification. For now I can just hide controls for demo. And in future I can add custom volume and fullscreen buttons.

Can be closed.

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

3 participants