Deeksha Rahangdale
Deeksha Rahangdale

Reputation: 61

Forward and Backward functionality not works for long video in Video tag of html 5

I am using Html video tag. I have added video URL from azure blob. When I click on play then it starts playing but when I want to make forward and backward to video, it is not going on that position where I want to start play. It is still on that current position. So I want to show loading when I click on forward when video is not ready to play same as YouTube. Here is my code:

<video id="video" class="family-post-img" controls="controls"
   <source src="@Model.FileURL" type="video/mp4">
</video>

I want to show video buffering as YouTube when I directly click on forward and backward if video is not ready to play.

Thanks

Upvotes: 1

Views: 1498

Answers (1)

user4723924
user4723924

Reputation: 11

When a user seeks through a video two events fire...

  1. onseeking triggers while they are seeking

  2. onseeked triggers when they are finished seeking.

Therefore, you need to monitor these events and take appropriate action, like this...

 <video src="movie.mp4" type="video/mp4" onseeking="CallAction1();" onseeked="CallAction2();" controls></video>

Upvotes: 1

Related Questions