返回官网

RTMP video playback in krpano VideoPlayer Plugin

狒狒 2017-3-28 krpano全景 1038 次
 <krpano version="1.18" bgcolor="0x000000">
    <!-- the videoplayer interface skin -->
    <include url="skin/videointerface.xml" />
    <!-- include the videoplayer plugin and load the video (use a low res video for iOS) -->
    <plugin name="video"
            url.flash="%SWFPATH%/plugins/videoplayer.swf"
            url.html5="%SWFPATH%/plugins/videoplayer.js"
            posterurl.ios="video-1024x512-poster.jpg"
            videourl.ios="rtmp://5X.2X.xx.X5:XX35od/myStream.mp4"
            posterurl.no-ios="video-1920x960-poster.jpg"
            videourl.no-ios="rtmp://5X.2X.xx.X5:XX35od/myStream.mp4"
            pausedonstart="true"
            loop="true"
            enabled="false"
            zorder="0"
            align="center" ox="0" oy="0"
            width.no-panovideosupport="100%"
            height.no-panovideosupport="prop"
            onloaded="videointerface_setup_interface(get(name)); setup_video_controls();"
            onvideoready="videointerface_videoready();"
            />

    <!-- custom control setup - add items for selecting videos with a different resolution/quality -->
    <action name="setup_video_controls">
        <!-- add  items to the control menu of the videointerface skin -->
        videointerface_addmenuitem(configmenu, vqtitle, 'Select Video Quality', true, videointerface_toggle_configmenu() );
        videointerface_addmenuitem(configmenu, q1, '1024x512',  false, change_video_file(q1, '"rtmp://5X.2X.xx.X5:XX35od/myStream.mp4"|video-1024x512.webm'); );
        videointerface_addmenuitem(configmenu, q2, '1920x960',  false, change_video_file(q2, '"rtmp://5X.2X.xx.X5:XX35od/myStream.mp4"|video-1920x960.webm'); );
        <!-- select/mark the current video (see the initial videourl attribute) -->
        if(device.ios,
            videointerface_selectmenuitem(configmenu, q1);
          ,
            videointerface_selectmenuitem(configmenu, q2);
          );
    </action>

    <!-- change the video file, but try keeping the same playback position -->
    <action name="change_video_file">
        plugin[video].playvideo('%CURRENTXML%/%2', null, get(plugin[video].ispaused), get(plugin[video].time));
        videointerface_deselectmenuitem(configmenu, q1);
        videointerface_deselectmenuitem(configmenu, q2);
        videointerface_selectmenuitem(configmenu, %1);
    </action>

    <!-- the panoramic video image -->
    <image devices="panovideosupport">
        <sphere url="plugin:video" />
    </image>

    <!-- set the default view - a light fisheye projection -->
    <view hlookat="0" vlookat="0" fovtype="DFOV" fov="130" fovmin="75" fovmax="150" fisheye="0.35" />
</krpano> 

发表评论

Copyright © 2016 DEWEBSTUDIO