On update the playvideo action is called on a flat video just after a panoramic video playback.
Seems that the <image><sphere></image> of the first panorama is always called for the flat panorama and I don't have any video display despite the visible attribute of the plugin set to true and width/height to 100%/prop. The use_as_videopano attribute is set to false also.
There is a solution to avoid the black screen and display the flat panorama into the same plugin ?
Works with 2 differents plugins (spherical video and flat video) but it's not a good solution for managing code.
Is it possible to play a "flat" video after a panoramic video into the same plugin ?
-
-
Hi,
I have to say I don't fully understand you request, but have already tried the latest krpano 1.18.3 version?
And do you have an example?Best regards,
Klaus -
Tested with 1.19.
Same with 1.18.3.In fact I add a plugin videoplayer to be able to display a panoramic video (use_as_videopano=true, visible=false and <image> tag) but on a scene change I want to display a flat video (with the use of playvideo action) into the same plugin (use_as_videopano=false, width=100%, height=prop, no <image> tag, visible=true) but I've a black display and seems that a sphere is display behind because I've a point hotspot that I can move.
-
Demo XML
XML
Alles anzeigen<?xml version="1.0" encoding="UTF-8"?> <krpano version="1.18" onstart="startup" bgcolor="#ffffff"> <action name="startup"> mainloadscene(pano1154); </action> <plugin name="videosceneplayer" url.flash="%SWFPATH%/graphics/videoplayer.swf" url.html5="%FIRSTXML%/graphics/videoplayer.js" videourl="" posterurl="" width.desktop.or.no-panovideosupport.or.html5.and.ie.and.mobile="100%" height.desktop.or.no-panovideosupport.or.html5.and.ie.and.mobile="prop" onloaded="videointerface_setup_interface(get(name));" onvideoready="videointerface_videoready();" buffertime="0.1" volume="1.0" pausedonstart="true" loop="false" use_as_videopano="true" keep="true" visible="false" enabled="false" zorder="0" align="center" ox="0" oy="0" /> <action name="videointerface_setup_interface"> set(videointerface_video, %1); set(plugin[get(videointerface_video)].setupdone, true); trace('setup interface done'); </action> <action name="videointerface_videoready"> trace('video ready done'); </action> <action name="mainloadscene"> if (xml.scene != %1, for(set(i,0), i LT scene.count, inc(i), if(scene[get(i)].name == %1, if(scene[get(xml.scene)].video, if(plugin[get(videointerface_video)], if(plugin[get(videointerface_video)].videourl, plugin[get(videointerface_video)].pause(); plugin[get(videointerface_video)].seek(0); ); ifnot(scene[get(i)].video, set(plugin[get(videointerface_video)].visible, false); ); ); ); loadscene(%1, NULL, MERGE, BLEND(1)); ); ); ); </action> <scene name="pano1154" heading="0" thumburl="%FIRSTXML%/dubai_1154/thumbnail.jpg" video="true" scenevideourl="%FIRSTXML%/dubai_1154/dubai.mp4" sceneposterurl="%FIRSTXML%/dubai_1154/frame.jpg" onstart=" set(plugin[videosceneplayer].use_as_videopano, true); set(plugin[videosceneplayer].width, ''); set(plugin[videosceneplayer].height, ''); set(plugin[videosceneplayer].visible, false); set(plugin[videosceneplayer].onvideocomplete, onvideoexitaction); if(plugin[videosceneplayer].videourl != scene[get(xml.scene)].videourlscene, if(plugin[videosceneplayer].setupdone, stopdelayedcall(videointerfaceidcall); plugin[videosceneplayer].playvideo(get(scene[get(xml.scene)].scenevideourl), get(scene[get(xml.scene)].sceneposterurl), false, 0); , delayedcall(0.2, scene[get(xml.scene)].onstart); ); , if(plugin[videosceneplayer].videourl, if(plugin[videosceneplayer].isvideoready, plugin[videosceneplayer].play(); , delayedcall(0.2, scene[get(xml.scene)].onstart); ); ); );" > <action name="onvideoexitaction"> mainloadscene(pano1156); </action> <autorotate horizon="0.000000" tofov="90.000000" waittime="1" speed="5"/> <view fisheye="0" limitview="range" hlookatmin="-180" hlookatmax="180" vlookatmin="-90" vlookatmax="90" maxpixelzoom="1.0" fovtype="VFOV" fovmax="90" fov="90.000000" hlookat="0.000000" vlookat="0.000000"/> <preview url="%FIRSTXML%/dubai_1154/preview.jpg" type="CUBESTRIP" striporder="FRBLUD"/> <image hfov="360" vfov="180" devices="panovideosupport.and.no-html5.or.panovideosupport.and.html5.and.desktop.or.panovideosupport.and.html5.and.no-ie"> <sphere url="plugin:videosceneplayer" /> </image> <hotspot name="spotpoint1160" ath="-2.450832" atv="-6.545455" descriptionid="" onclick="onclickspotpoint1160" url="%FIRSTXML%/spots/hotspot_neutral_user_defaultpoint0.png" visible="true" zorder="3" /> <action name="onclickspotpoint1160"> mainloadscene(pano1156); </action> </scene> <scene name="pano1156" heading="0" thumburl="%FIRSTXML%/dubai_1156/thumbnail.jpg" video="true" scenevideourl="%FIRSTXML%/dubai_1156/dubai.mp4" sceneposterurl="%FIRSTXML%/dubai_1156/frame.jpg" onstart=" set(plugin[videosceneplayer].use_as_videopano, false); set(plugin[videosceneplayer].width, 100%); set(plugin[videosceneplayer].height, prop); set(plugin[videosceneplayer].visible, true); set(plugin[videosceneplayer].onvideocomplete, onvideoexitaction); if(plugin[videosceneplayer].videourl != scene[get(xml.scene)].scenevideourl, if(plugin[videosceneplayer].setupdone, stopdelayedcall(videointerfaceidcall); plugin[videosceneplayer].playvideo(get(scene[get(xml.scene)].scenevideourl), get(scene[get(xml.scene)].sceneposterurl), false, 0); trace(get(plugin[videosceneplayer].videourl)); , delayedcall(0.2, scene[get(xml.scene)].onstart); ); , if(plugin[videosceneplayer].videourl, if(plugin[videosceneplayer].isvideoready, plugin[videosceneplayer].play(); , delayedcall(0.2, scene[get(xml.scene)].onstart); ); ); );" > <action name="onvideoexitaction"> mainloadscene(pano1154); </action> <view fisheye="0" limitview="range" hlookatmin="-180" hlookatmax="180" vlookatmin="-90" vlookatmax="90" maxpixelzoom="1.0" fovtype="VFOV" fovmax="90" fov="90.000000" hlookat="0.000000" vlookat="0.000000"/> <preview url="%FIRSTXML%/appartement_1153/preview.jpg" type="CYLINDER"/> <hotspot name="spotpoint1160" ath="-2.450832" atv="-6.545455" descriptionid="" onclick="onclickspotpoint1160" url="%FIRSTXML%/spots/hotspot_neutral_user_defaultpoint0.png" visible="true" zorder="3" /> <action name="onclickspotpoint1160"> mainloadscene(pano1151); </action> </scene> </krpano>
-
Hi!
you can mix flat and 360 video in one file, and swith projection settings from flat to 360 and back if you need and when you need
i'm already done such thing :) for one of my customers
if you interested, let me know i will show you online demoBest regard
Andreyskype: mindlessboss
-
In one file ... means in one video file ?
I'm interested on the load of differents videos which can be "flat" (plugin video only) or spherical (plugin video with <image> tag) into the same plugin instance. -
Hi!
yes in one video fileAndrey
-
Ok I can do it also but it's not a good solution for my problem.
Fallback solution is to use a plugin videoplayer for flat and on other for spherical but I must change all the "generic" code due to this "hack". It's why I look for a better solution. -
Klaus do you have this kind of issue too with my source code ?
-
Hi,
so far I understand you want to switch back from panoramic display to normal display as layer - right?
I've checked that case yet, but it's already on my list.
Best regards,
Klaus -
Is it possible to do cube to flat or cube to all available projections? This could be used as a super awesome tool to create a print proof process.
-
so far I understand you want to switch back from panoramic display to normal display as layer - right?
I've checked that case yet, but it's already on my list.
Yes.
Perfect, this change will be good to avoid double plugin instance on my side for generic code.
-
Hi Klaus,
do you have any updates on this? I would also like to switch between a panorama video and a flat/standard video. I feel like it's nearly there simply by loading the flat video into the plugin using:Codeplugin[video].playvideo('myvideo.mp4', null, get(plugin[video].ispaused), get(plugin[video].time));
and then changing to the "flat view" action as supplied in the plugin's videointerface.xml:
The trouble is that the resulting flat video doesn't fill the view, and you're able to drag the flat video off the viewing area. I tried using "set(control.usercontrol,off);" but it doesn't seem to have an effect once I switch to the flat view.
Is this the wrong way to go about loading up a flat video? Do I need to use a separate <layer> rather than the <plugin> element?
Best regards, Dan -
Hi,
ZitatThe trouble is
that the resulting flat video doesn't fill the view, and you're able to
drag the flat video off the viewing area. I tried using"set(control.usercontrol,off);" but it doesn't seem to have an effect once I switch to the flat view.It should be enough to set the viewing limits accordingly.
E.g. try:
after changing the <image> fov values from spherical to flat.See also here:
https://krpano.com/docu/xml/#view.limitviewZitatIs this the wrong way to go about loading up a flat video? Do I need to use a
separate <layer> rather than the <plugin> element?No, that's already the right and recommended way.
Best regards,
Klaus
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!