Using hotspots (html5/ flash) to run a video/ link

Q&A about the latest versions
Post Reply
rtomada
Posts: 9
Joined: Thu May 10, 2012 1:33 pm

Hi,

I'm quite new to Object2VR but I already love the software. After a short discussion today with one of my clients about how to enhance object spins he asked me if it is possible to not only show images using hotspots but to run a video/ animation or open a link using hotspots. Is it possible to do such things an if, how would I do it?

Kind regards

Raoul
User avatar
Hopki
Gnome
Posts: 13018
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Raoul,
It is possible, for flash please see the Tip: http://gardengnomesoftware.com/wiki/Add ... Tube_Video
For HTML5 please see: http://gardengnomesoftware.com/wiki/HTM ... Tube_video

For local video files, for Flash it has to be in a SWF container, then just point the external image/SWF loader at the file.

For HTML5 its a little more involved but can be done, in fact just done it for a customer. The problem is different browsers support different file types. Safari supports MP4 and Firefox supports OGG.

You do this by using the text box and iframe code to open an html page. The html page has the code to play the videos, below is the code for the video HTML page:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>HTML5 Video</title>
</head>

<video width="480" height="368" controls="controls">
    <source src="video.mp4" type="video/mp4" />
    <source src="video.ogg" type="video/ogg" />

  Your browser does not support the video tag.
</video>


<body>
</body>
</html>
The button or hotspot that will open the video will need to set the text to the text box:

So Mouse Click => Set Text: then the below iframe code. This will show the video.HTML page and play the videos. Also works on iPads 8)

Code: Select all

<iframe width="490" height="388" src="video/video.html" frameborder="0" allowfullscreen></iframe>
I use HandBrake to encode the MP4: http://handbrake.fr/
and VLC for the OGG: http://www.videolan.org/vlc/index.html

Regards,
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
rtomada
Posts: 9
Joined: Thu May 10, 2012 1:33 pm

Hi Hopki,

good to hear that it is possible. I will have a look at the examples you've mentioned. Thanks for the quick reply.

Regards
Raoul
rtomada
Posts: 9
Joined: Thu May 10, 2012 1:33 pm

Hi Hopki,

I've followed your YouTube tutorial which was pretty straight forward. It works perfect except I am not able to tell the video to show only when clicking the hotspot (in fact I only have one hotspot at the moment). At the moment the video shows up after the spin has loaded (flash).
Can you shed some light on how to archive that? I've found another tutorial dealing with hotspots in Pano2VR but it uses point hotspots which doesn't seem to be available in Object2VR.

Regards
Raoul
User avatar
Hopki
Gnome
Posts: 13018
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
Which may help is the Tour found on our examples page: http://gardengnomesoftware.com/pano2vr_example.php
Has a link to the projects files including the Flash Skin, flash_tour.ggsk.

This shows how the video window is opened and closed.
In the Skin Editor file tree you are looking for the elements, hs_video and video_bg.
The hs_video open the video window, then the close_video button in the element video_bg closes it.
This method has a separate Hotspot Template for each video.

What you can also do is use Hotspot Proxy ID's linked to containers that has the code to open the video_bg and change the video file, these means you can play many videos with the same video_bg element.

Kind regards,
Martin
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Post Reply