Hotspot video clip

jtanz
Posts: 28
Joined: Mon Mar 27, 2017 11:24 pm

Hotspot video clip

Postby jtanz » Fri Apr 28, 2017 2:54 pm

Is it currently possible or in future plans to enable hotspots to be mini video clips that can be clicked on to open up a video or scene?
If not, would this be pretty easy to do as a plugin?

User avatar
aberthet
ForgeJS Team
Posts: 10
Joined: Tue Dec 13, 2016 2:53 pm

Re: Hotspot video clip

Postby aberthet » Fri Apr 28, 2017 3:12 pm

Yes it is currently possible, here's what you can do:

  • add an action to the onClick event of the hotspots :

    Code: Select all

    {
        "uid": "hotspot-video-n",

        "events":
        {
            "onClick": "load-scene-n"
        }
    }

  • specify the action to have something like this:

    Code: Select all

    {
        "uid": "load-scene-n",
        "target": "viewer.story",
        "method":
        {
            "name": "loadScene",
            "args": ["scene-n"]
        }
    }

It is a simple hotspot behavior, and hotspots as video are available since the 0.9.2 release last week.

jtanz
Posts: 28
Joined: Mon Mar 27, 2017 11:24 pm

Re: Hotspot video clip

Postby jtanz » Fri Apr 28, 2017 3:23 pm

Great! Are there any new or updated samples showing that functionality in it?

I will have to check what all has changed from my current library version to the latest to see what all will break and have to fix before updating to the newest version to implement this feature.

User avatar
bbaudel
ForgeJS Team
Posts: 15
Joined: Wed Oct 26, 2016 9:20 am

Re: Hotspot video clip

Postby bbaudel » Sat Apr 29, 2017 9:09 pm

Hi,

Here is the sample : https://forgejs.org/samples/hotspots-video

Have a nice day,
Benjamin

jtanz
Posts: 28
Joined: Mon Mar 27, 2017 11:24 pm

Re: Hotspot video clip

Postby jtanz » Sat Apr 29, 2017 10:10 pm

Awesome. Thanks!

Who is online

Users browsing this forum: Google [Bot] and 2 guests