load a youtube video

  • Hi guys!

    Any news about inserting Youtube html5 player into Krpano? Any ideas?

    On some forums I've read that adding

    Code
    html5=1

    or

    Code
    html5=true

    to youtube player parameters forces youtube use its html5 player.

    I tried the code like this:

    Code
    <plugin name="youtube" devices="html5"
        	url="http://www.youtube.com/v/0kW2Vh3KeEs?html5=1"
        	align="center"
        	maskchildren="true"
        	onloaded="registercontentsize(640,390);"
          />

    but is shows loading error. "html5-true" makes no difference either(((

    Does anybody have some positive results in this?

    Regards,

    Alexey

  • Hi,

    for html5-only you could use iframes within the textfield plugin,
    e.g.

    Code
    <layer name="youtubeiframe" devices="html5"
           url="textfield.swf"
           html="[iframe width='560' height='315' src='//www.youtube.com/embed/iQx28i6w0jc' frameborder='0' allowfullscreen][/iframe]"
           width="560"
           height="315"
           padding="0"
           align="center"
           />

    Note - use padding=0 and the same width/height for the iframe and the plugin size.

    Best regards,
    Klaus

  • Okay, thanks to Klaus we have now a solution for html5 which works flawlessly.

    I've spent now some time playing around with Flash version of this and the only "corner stone" I stumble upon is how to mute video when "close" button of the background layer is pressed. If i remove the layer with video, it disappears but sound goes on. I tried a workaround - added a soundinterface and tried to use "stopallsounds(true);" in hope that this will force the sound to stop, but to no effect((( I set "mute=true", of course.

    I will keep try and error, maybe some of you here have other ideas?

    Regards,

    Alexey

  • Hi again!)

    I'm now playing with video from Vimeo inside the tour. For html5 I used the same code as was suggested by Klaus for using with youtube.

    Code
    <layer name="video_3" devices="html5"
           url="plugins/textfield.swf"
    	   html="[iframe src='http://player.vimeo.com/video/93491995' width='640' height='480' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen][/iframe]"
           width="640"
           height="480"
           padding="0"
           align="center"
        />

    It works flawlessly for html5.

    With Flash, I tried using link to the video inside the url of the layer, like this:

    Code
    <layer name="video_3" devices="flash"
        	url="http://player.vimeo.com/video/93491995"
        	align="center"
        	maskchildren="true"
        	onloaded="registercontentsize(640,480);"
        />

    But it throws error: "ERROR: decoding failed - http://player.vimeo.com/video/93491995".

    Maybe there's some workaround for this inside Krpano (and no need to write an AS3 plugin)?

    Thanks!

    Regards,

    Alexey

  • But it throws error: "ERROR: decoding failed - http://player.vimeo.com/video/93491995".

    It's not possible to include a whole website as Flash plugin!

    Look here for Vimeo Flash embedding:
    http://developer.vimeo.com/player/embedding#flash

    Try:

    Code
    <layer name="video_3" devices="flash"
           url="http://vimeo.com/moogaloop.swf?clip_id=93491995"
           align="center"
           maskchildren="true"
           onloaded="registercontentsize(640,480);"
           />

    Best regards,
    Klaus

  • Hi Klaus,

    I use your code:

    Code
    <layer name="youtubeiframe"
    devices="html5"
    url="plugins/textfield.swf"
    html="[iframe width='560' height='315' src='//www.youtube.com/embed/lmzrvtThVj4' frameborder='0' allowfullscreen][/iframe]"
    width="560"
    height="315
    padding="0"
    align="center"
    />


    It works fine on Google Chrome / Internet Explorer and Smartphone, but it don't work on Firefox ... *confused*

    Can you give me some help ? *rolleyes*

    Thanks a lot *wink*

  • Hi Klaus,

    I've solved my problem by my own.

    1) I change the value for "html5" into the the tour.html file. From"auto" to "prefer".

    Code
    <script>
    embedpano({swf:"tour.swf", xml:"tour.xml", target:"pano", html5:"prefer", passQueryParameters:true});
    </script>


    2) Check the "about:config" into firefox to manage WebGL options

    Now it works fine. *wink*

  • Hi klaus,

    To kill the sound you talk about this code :

    Code
    onclick="removelayer(youtubeiframe);"


    Ok it works but how to switch from "remove" to "add" ?

    I need to make a button that will show and hide the layer.

    Here is my code :


    Here the layer is visible and hide but the sound is always On.

    I try the "addlayer" solution, but nothing happen ...

    Can you tell me when the krpano version 1.18 will be out ? It will be free for KRPano user with comercial licence ? *huh*

    Thanks

  • Klaus,

    Here is what I'm looking for :

    1. Add a Hotspot into my panoramic view call "Show YouTube Video".
    2. When I click on the Hotspot I want to laod the YouTube Iframe (it is a Layer call : "youtubeiframe").
    3. Play the video with the YouTube control button.
    4. Click on a Button call "Close" that will hide the YouTube Iframe and STOP the sound. To do this I can use this code :

    Close button code :

    Code
    onclick="removelayer(youtubeiframe);"


    Now If I click on the Hotspot "Show YouTube Video" I can't laod the YouTube Iframe. So I was thinking about using the code :

    Code
    onclick="addlayer(youtubeiframe);"

    But I can't laod the layer "youtubeiframe" anymore ... *confused*

    Thanks for your help.

Participate now!

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