after media event error, action via hotspot no error

nedr
Posts: 15
Joined: Fri Aug 18, 2017 12:30 pm

after media event error, action via hotspot no error

Postby nedr » Wed Dec 27, 2017 11:48 am

After a video in a scene is ended, I want the user to go to a next scene.
I would love a hotspot that appears when the video is ended. Because I don't know how to to do this with a action, I load a new scene with a image and a hotspot on it, with the media event onEnded. It is working but in the browser console I get this message:

Code: Select all

HTTP “Content-Type” of “text/html” is not supported. Load of media resource http://url.nl/preview/ failed.
preview
Cannot play media. No decoders for requested formats: text/html


When I go to another scene with an action onClick on a hotspot, I don't get this error.
Also when I load the scene directly, I also don't get this error.

I only get this error with an action via media event onEnded, I think.

This is a part of my config:

Code: Select all

"history":{
      "enabled": false
   },
    "story":{
        "uid": "PS",
        "name": "PS",
        "slug": "PS",
        "description": "PS",
        "default": "scene-imgplat-intro",

        "scenes": [
            {
                "uid": "scene-imgplat-intro","name": "scene-imgplat-intro","slug": "scene-imgplat-intro",
                "media":{"uid": "img-plat-intro","type": "image","source":{"format": "flat","url": "media/video_plat/intro/screenshot.jpg"}},
            "view":{"type": "flat","options":{"repeatX": false, "repeatY": false}},
            "hotspots":[
               {"uid": "hotspot-start-plat-intro","facingCenter": true,"geometry": {"type": "plane","options": {"width": 100,"height": 100 }},"transform": {"position": {"x": 0,"y": 0,"z": -220}},"material":{"image": "media/hotspot_start.png","opacity": 0.8},"events":{"onClick": ["laadscene-videoplat-intro"]},"animation":{"enabled": true,"loop": true,"random": false,"autoPlay": true,"tracks": [ "hotspot-intro-track-1"]}}
            ]
            },
         {
                "uid": "scene-videoplat-intro","name": "scene-videoplat-intro","slug": "scene-videoplat-intro",
                "media": {"uid": "video-plat-intro","type": "video",
               "source":{
                        "format": "flat","stream": "html5",                       
                   "levels": [
                     { "url": "media/video_plat/intro/video-good.mp4", "device": { "desktop": true } },
                     { "url": "media/video_plat/intro/video-medium.mp4", "device": { "tablet": true } },
                     { "url": "media/video_plat/intro/video-low.mp4", "device": { "mobile": true } }
                  ]
                    },
                    "options":{"autoPlay": true,"loop": false,"volume": 1},
               "events": {"onEnded": ["laadscene-img360-intro"]}
                },
            "view":{"type": "flat","options":{"repeatX": false, "repeatY": false}},
            "camera":{"parallax": 0,"roll": { "default" : 0, "min": 0, "max": 0 },"fov": { "default" : 180, "min": 70, "max": 180 }}
            },
         {
                "uid": "scene-img360-intro","name": "scene-img360-intro","slug": "scene-img360-intro",
                "media":{"uid": "img-plat-intro","type": "image","source":{"format": "flat","url": "media/video_plat/intro/screenshot.jpg"}},
            "view":{"type": "flat","options":{"repeatX": false, "repeatY": false}}
            },
         {
                "uid": "scene-video360-intro","name": "scene-video360-intro","slug": "scene-video360-intro",
                "media": {
                    "uid": "video-360-intro", "type": "video",
               "source":{
                        "format": "equi","stream": "html5",                       
                   "levels": [
                     { "url": "media/video_360/intro/video-good.mp4", "device": { "desktop": true } },
                     { "url": "media/video_360/intro/video-medium.mp4", "device": { "tablet": true } },
                     { "url": "media/video_360/intro/video-low.mp4", "device": { "mobile": true } }
                  ]
                    },
                    "options":{"autoPlay": true,"loop": true,"volume": 0}
                },
            "view":{"type": "rectilinear"}
            }
        ]
   },
   "actions":[
      {"uid": "laadscene-imgplat-intro","target": "viewer.story","method":{"name": "loadScene","args": ["scene-imgplat-intro"]}},
      {"uid": "laadscene-videoplat-intro","target": "viewer.story","method":{"name": "loadScene","args": ["scene-videoplat-intro"]}},
      {"uid": "laadscene-img360-intro","target": "viewer.story","method":{"name": "loadScene","args": ["scene-img360-intro"]}},
      {"uid": "laadscene-video360-intro","target": "viewer.story","method":{"name": "loadScene","args": ["scene-video360-intro"]}}
      
   ]

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

Re: after media event error, action via hotspot no error

Postby bbaudel » Tue Mar 27, 2018 8:18 am

Sorry for the answer delay.
So you would like to display a hotspot with a go to next scene action when a video scene media is ended?

Who is online

Users browsing this forum: No registered users and 1 guest