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

Change video time #5459

Open
thumaman opened this issue Apr 12, 2024 · 2 comments
Open

Change video time #5459

thumaman opened this issue Apr 12, 2024 · 2 comments
Labels
Type: Feature ⚙ Request or idea for a new feature.

Comments

@thumaman
Copy link

thumaman commented Apr 12, 2024

Is there a way of manually changing time of the current video playing?

I have the following code:

<div class="video-player">
    <Video @ref="mainVideo" Source="@videoSource" DefaultQuality="1080" AutoPlay="true"
           ClickToPlay="false" CurrentTime="@currentTime" TimeUpdate="HandleTimeUpdate" Ended="@OnVideoEnded"
           SettingsList="new VideoSettingsType[]{VideoSettingsType.Captions, VideoSettingsType.Quality}"
           ControlsList="new string[] { VideoControlsType.Mute, VideoControlsType.Volume, VideoControlsType.Settings,
                                        VideoControlsType.Progress, VideoControlsType.CurrentTime,VideoControlsType.Captions }"
            Seeking="HandleSeeking" Seeked="HandleSeeked"
           Paused="@OnMainVideoPaused" Playing="@OnMainVideoPlaying" 
           />
    
    {
        <div class="pip @(isPipEnabled ? "pip-front": "pip-back")">
            <Video @ref="pipVideo" Source="@videoSource" DefaultQuality="1080" AutoPlay="true"
                   ClickToPlay="false" CurrentTime="@currentTime2"
                   TimeUpdate="@OnTimeUpdate2"
                   Controls="false"
                   SettingsList="new VideoSettingsType[] {}"
                   ControlsList="new string[] {}" />
        </div>
    }
</div>

I want to change the time of the second video player every time the user changes time in the first video player so that they are correctly synced.
Any recommendations would be much appreciated :)

@thumaman thumaman added the Type: Feature ⚙ Request or idea for a new feature. label Apr 12, 2024
@David-Moreira
Copy link
Contributor

I believe I have posted an example of that on your last issue, can you check?

There's this example with jump to 20s
https://bootstrapdemo.blazorise.com/tests/video
https://github.com/Megabit/Blazorise/blob/master/Demos/Blazorise.Demo/Pages/Tests/VideoPage.razor

@stsrki
Copy link
Collaborator

stsrki commented Apr 12, 2024

That is what CurrentTime is used for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature ⚙ Request or idea for a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants