The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Create multi-choice videos with buttons appearing after 5 seconds the start of the video: how to do it?
calmabubbasst
post Jul 2 2023, 06:39 AM
Post #1


Member
***

Group: Members
Posts: 45
Joined: 20-July 22
Member No.: 28,449



Create multi-choice videos with buttons appearing after 5 seconds the start of the video: how to do it?

Hi everyone, how are you guys? smile.gif

I recently saw this https://www.gotolstoy.com/interactive-video

and i thought i could come up with something fun with that, but i don't want to become a slave to a platform or a vendor,
so I thought I could get the same effect with a page that contains the intro video10 and below appear the buttons with links to the pages that contain video20 , video 30, video .. and continue doing so by loading the new pages (with the same page style to hide the transition) and new videos to continue the story.

So what I need are
- how to make the link buttons appear under the video after 5 or 6 seconds after the start of the video?
- how can I pre-load the next videos into memory while I'm watching the previous video? (so as not to have a long wait after choosing the new video and not interrupt the story)
[color=#FF0000]

Could you help me again this time?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 2 2023, 05:04 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



Hello! All this likely requires javascript. I haven't tried any of the below.

QUOTE(calmabubbasst @ Jul 2 2023, 01:39 PM) *

- how to make the link buttons appear under the video after 5 or 6 seconds after the start of the video?

You might check when the JS currentTime property has reached the 5 second mark: https://developer.mozilla.org/en-US/docs/We...ent/currentTime, or you might start an independent JS timer when the user clicks the Play button. In either case the video playback may become shorter or longer than exactly five seconds IRL --perhaps the user skips parts of the video, pauses the playback, or maybe there's a download delay.

QUOTE
- how can I pre-load the next videos into memory while I'm watching the previous video? (so as not to have a long wait after choosing the new video and not interrupt the story)[/b][color=#FF0000]

Are there many branching videos being preloaded at the same time? That could result in a high server load, make sure your webhost allows it...

If you use separate VIDEO elements for each video, maybe you could use the PRELOAD attributes for each upcoming VIDEO element (while it's made invisible by the timer with CSS): https://developer.mozilla.org/en-US/docs/We...L/Element/video or if you load each new video in a framed page, perhaps use https://developer.mozilla.org/en-US/docs/We...tes/rel/preload

It also seems possible to change a single VIDEO element's VideoTrackList, but then I don't know how preloading works: https://developer.mozilla.org/en-US/docs/We.../VideoTrackList
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 3 2023, 02:17 PM
Post #3


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Isn't that what SMIL is for? And no, I don't know SMIL. cool.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 3 2023, 04:50 PM
Post #4


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



I remember that acronym from long ago (but nothing else). blink.gif

Not sure about browser support (MS Edge?): https://en.wikipedia.org/wiki/Synchronized_...ge#SMIL_players and I didn't get many search results for "W3C SMIL", but here's the spec anyway: https://www.w3.org/TR/SMIL3/
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 3 2023, 05:19 PM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



According to wikipedia it hasn't been updated in quite a while but is commonly used. Or that was my impression anyway.

They seem to be right about the lack of recent updates anyway. But maybe it was perfected already 2008. laugh.gif
https://www.w3.org/AudioVideo/
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 4 2023, 08:31 AM
Post #6


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



QUOTE(pandy @ Jul 4 2023, 12:19 AM) *

is commonly used. Or that was my impression anyway.

Not so much on web pages maybe:

"SMIL is used in various applications, such as multimedia messaging on mobile phones, digital signage, and advanced content in the discontinued HD DVD format. Numerous authoring and rendering tools are available for creating SMIL content. SMIL can also be combined with other XML-based standards like SVG, RSS, VoiceXML, MusicXML, and TEI. While most web browsers natively support SMIL, Microsoft browsers do not, and the future of SMIL support in Google Chrome is uncertain. Playback of SMIL content can be achieved through various software and hardware media players."

unsure.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd April 2024 - 08:41 AM