ERROR 'unknown action: playvideo' on mobile only

  • Guten Morgen,

    I am receiving the error 'WARNING: unknown action: playvideo' on mobile devices only. The desktop plays the video just fine.

    The weirdest part about this error is that even when I revert to previous saves where I know 'playvideo' worked, I still receive the error. In fact, this was working yesterday morning when I finished coding and it only began to not work later that night when no code was changed on my end.

    the playvideo action is described here: https://krpano.com/plugins/videoplayer/#playvideo


    and here is where I call it, where the error is thrown.

    <hotspot name="featured_panorama"
    distorted="true"
    url="http://beta.vr.meventi.de/panorama/78/featured_thumb.png"
    ty="375" tx="-860"
    rx="0.0" ry="-15.0" rz="0.0"
    scale="1.08"
    depth="1300"
    onover="tween(depth,1260);" onout="tween(depth,1300);"
    onclick="changepano( loadscene(video_scene, null, MERGE|KEEPVIEW|KEEPMOVING, BLEND(1)); ); ifnot(device.ios, set(plugin[video].videourl, /panorama/78/video-1920x960.mp4); , set(plugin[video].videourl, /panorama/78/video-1344x672.mp4|/panorama/78/video-iphone-sound.mp3);); ifnot(device.ios, plugin[video].playvideo(/panorama/78/video-1920x960.mp4); , playvideo(/panorama/78/video-1344x672.mp4|/panorama/78/video-iphone-sound.mp3);); plugin[video].play(); hide_all_videos();"
    />


    <plugin name="video" keep="true"
    url.flash="%SWFPATH%/plugins/videoplayer.swf"
    url.html5="%SWFPATH%/plugins/videoplayer.js"
    videourl.no-ios="/panorama/%$panoId%/video-1920x960.mp4|/panorama/%$panoId%/video-1920x960.webm"
    videourl.ios="/panorama/%$panoId%/video-1344x672.mp4|/panorama/%$panoId%/video-iphone-sound.mp3"
    loop="true"
    pausedonstart="true"
    visible="false"
    use_as_videopano="true"
    />

    Note that plugin[video].play(); does work on mobile devices


    *smile* Ian,

    Using 1.19 pr3

    Edited once, last by inframatic (March 17, 2016 at 12:23 PM).

  • Consider this:

    in my video folder i have the following files in this example case.
    heli-2k.mp4
    heli-2k.webm


    of course you can extend the ChangevideoScene action for the different devices and resolutions etc..
    Very convenient this way. And also easy to make multi 360 video tours or mixed content etc.. With using the moving hotspots of course *wink*

    Hope it helps,

    Tuur *thumbsup*

  • You fixed the problem and optimised my code!

    The actual error was immediately fixed when i added plugin[video].playvideo() instead of playvideo.
    I am baffled as to how this worked for so long before but then suddenly stopped working.

    Why do you set the plugin's enabled to equal false? Doesn't the plugin basically not do anything if I'm on a different scene?


    The ChangeVideoScene() and startup() shortened my code by a good chunk since I was repeating this hotspot example above in a number of places.


    Thanks again!


    Ian Steffy *tongue*

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!