Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 11:59 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Playing YouTube Video
PostPosted: June 8th, 2017, 9:21 am 
Offline

Joined: November 26th, 2008, 12:21 am
Posts: 340
Location: Jersey, United Kingdom
Opus: 8.5e (latest build)
OS: Windows 8 (also lots of virtual versions)
System: Generally Toshiba or HP laptops and HP servers
Hi,

I have created a publication with a page that has a youtube object and the URL set to "None". What I need to do is tell the video to use the variable "VideoURL" as its source URL as I need to be able to change the source URL each time the page loads. I can't see how to set the URL via a script, can anyone help?

Also when I play the youtube video I need the audio to be muted as I don't want the sound to play. Can this be done?

Thanks


For this message nathanwright has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Playing YouTube Video
PostPosted: June 9th, 2017, 11:02 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
It's easy enough to dynamically load / switch YouTube videos by tapping into the opus.js source code.

Create a YouTube video object called 'V1' or use a different name and adjust the code below and then simple add your own YouTube embed link:

Code:
V1.setEmbeddedURL("https://www.youtube.com/embed/Agny54Z6jmM");
V1.startObject(true);


The controlling of the video is possible, such as muting but you need to look at using the API which is much more involved:

https://developers.google.com/youtube/i ... _reference

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Playing YouTube Video
PostPosted: June 9th, 2017, 11:22 am 
Offline

Joined: November 26th, 2008, 12:21 am
Posts: 340
Location: Jersey, United Kingdom
Opus: 8.5e (latest build)
OS: Windows 8 (also lots of virtual versions)
System: Generally Toshiba or HP laptops and HP servers
Thanks Mack, thats brilliant.


For this message nathanwright has been thanked by : mackavi


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group