new videoplayer plugin, no good work. (width, height)

  • FLASH + KRPANO krpano 1.0.8.15


    <layer name="videoPlayer" url="%SWFPATH%/plugin/videoplayer.swf" alturl="%SWFPATH%/plugin/videoplayer.js"
    align="lefttop" zorder="80"
    keep="true" visible="true"
    scale="1.0" distorted="true" blendmode="layer"
    x="10" y="39"
    width="580" height="416"
    scalechildren="true"
    pausedonstart="false"
    loop="false"
    volume="1.0"
    buffertime="0.1"
    ignoremetadata="false"
    updateeveryframe="true"
    onclick="togglepause();" /> *sad*


    Edited 5 times, last by redgull (August 11, 2012 at 3:02 PM).

  • <hotspot name="hs2" devices="all"
    keep="false" visible="true" zorder="0"
    enabled="true" usecontentsize="false" handcursor="true" capture="true" children="true" maskchildren="false"
    fillcolor="0xffffff" fillalpha="0.00" borderwidth="0.0" bordercolor="0xffffff" borderalpha="0.00"
    fillcolorhover="0xffffff" fillalphahover="0.30" borderwidthhover="0.0" bordercolorhover="0xffffff" borderalphahover="0.00"
    fadeintime="0.150" fadeouttime="0.300" fadeincurve="1.100" fadeoutcurve="0.700"
    onhover="showtext(get(data[img_tdyjdcq].content), simpleText)"
    onclick="action(showAndPlayVideo, '%SWFPATH%/files/tiedaoyoujidui.flv');"
    bgalpha="0"
    bgcapture="false"
    bgcolor="0"
    type="image"
    >
    <point ath="170.0744" atv="-14.1007" />
    <point ath="170.7511" atv="-14.5139" />
    <point ath="-171.0076" atv="-12.2460" />
    <point ath="-170.9478" atv=" 9.3343" />
    <point ath="170.7650" atv=" 11.1365" />
    <point ath="170.0577" atv=" 10.8695" />
    </hotspot>


    <layer name="videoPanel" url="%SWFPATH%/skin/bg_video.png"

    align="center" edge="center" zorder="80"
    keep="true" visible="false" handcursor="false"
    width="600" height="490" x="0" y="0"
    >
    <layer name="videoPlay" url="%SWFPATH%/skin/btn_player_play.png"
    align="lefttop" edge="center" zorder="80"
    keep="true" visible="false"
    width="13" height="13" x="20" y="470"
    onclick="action(actVideoPlay);"
    onhover="showtext('播放', defText);"
    />
    <layer name="videoPause" url="%SWFPATH%/skin/btn_player_pause.png"
    align="lefttop" edge="center" zorder="80"
    keep="true" visible="true"
    width="12" height="13" x="20" y="470"
    onclick="action(actVideoPause);"
    onhover="showtext('暂停', defText);"
    />
    <layer name="videoStop" url="%SWFPATH%/skin/btn_player_stop.png"
    width="13" height="13" x="32" y="464"
    align="lefttop" zorder="80"
    keep="true" visible="true"
    onclick="action(actVideoStop);"
    onhover="showtext('停止', defText);"
    />
    <layer name="videoClose" url="%SWFPATH%/skin/btn_player_close.png"
    width="22" height="22" x="565" y="10"
    align="lefttop" zorder="80"
    keep="true" visible="true"
    onclick="action(actVideoClose);"
    onhover="showtext('关闭视频窗口', defText);"
    />
    <layer name="videoPlayer" url="%SWFPATH%/plugins/videoplayer.swf" alturl="%SWFPATH%/plugins/videoplayer.js"
    posterurl="%SWFPATH%/skin/bg_video_loading.png"
    align="lefttop" zorder="80"
    enabled="true" capture="true"
    keep="true" visible="true"
    scale="1.0" x="10" y="39"
    width="518" height="416"
    pausedonstart="false"
    loop="false"
    volume="1.0"
    buffertime="0.1"
    ignoremetadata="true"
    onvideoready="set(width, 580); set(height, 416);"
    onclick="action(togglePause);"
    onvideocomplete="action(actVideoClose); "
    />
    </layer>


    <action name="actVideoPlay">
    set(layer[videoPlay].visible, false);
    set(layer[videoPause].visible, true);
    layer[videoPlayer].play();
    </action>
    <action name="actVideoPause">
    set(layer[videoPlay].visible, true);
    set(layer[videoPause].visible, false);
    layer[videoPlayer].pause();
    </action>
    <action name="togglePause">
    if(layer[videoPlayer].ispaused,
    set(layer[videoPlay].visible, false);
    set(layer[videoPause].visible, true);
    ,
    set(layer[videoPlay].visible, true);
    set(layer[videoPause].visible, false);
    );
    plugin[videoPlayer].togglepause();
    </action>
    <action name="actVideoStop">
    set(plugin[videoPlay].visible, true);
    set(plugin[videoPause].visible, false);
    plugin[videoPlayer].stop();
    </action>
    <action name="actVideoClose">
    layer[videoPlayer].closevideo();
    fadeout(videoPanel);
    </action>
    <action name="showAndPlayVideo">
    fadein(videoPanel);
    layer[videoPlayer].playvideo(%1);
    set(layer[soundON].visible, false);
    set(layer[soundOFF].visible, true);
    soundoff();
    </action>


    *sad* *sad* *confused* *confused* *confused* *confused* *confused* *confused*

  • Hi,

    thanks for this example!

    The problem here is the new performance optimization in the 1.0.8.15 version - the new scaling of the videoplayer will not be set when the internal real pixelsize of the video will be set/registered. I will provide soon an update where this will be fixed.

    As workaround for the moment you can try something like this:

    Code
    onvideoready="set(scale,1.0001);updatepos();set(scale,1.0);"

    This should force an update to get the correct size.

    Best regards,
    Klaus

Participate now!

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