Sie sind nicht angemeldet.

1

Mittwoch, 7. Dezember 2016, 23:53

panovideo filename prefix for iOS

For some reason it seems iOS is unable to read a pano-video file with 3840x1920 pixels. I just get loading failed. It works fine on desktops and Android. So I figure I need to have a lower resolution file for iOS devices.

While I have seen the panovideo example, and how it is done there, I need to do it a little differently (for a multitude of reasons). So I am thinking that I wanted to set a filename prefix to a variable, and prefix all the video-filenames with that prefix. The prefix is set like this:

Quellcode

1
if(device.ios,	set(_video_prefix,"iOS_");	,	set(_video_prefix,""););


So far so good.

Now, I want to use the _video_prefix in a similar fashion as the %CURRENTDIR% variable, so that I could specify something like this:

Quellcode

1
plugin[video].playvideo("%_video_prefix%myfilename.mp4|%_video_prefix%myfilename.webm");


Is there some way of doing this?

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

2

Donnerstag, 8. Dezember 2016, 13:00

Maybe use IF method like this

Quellcode

1
2
3
4
5
if(davice.ios,    
 plugin[video].playvideo("IOS_myfilename.mp4|IOS_myfilename.webm");  
,    
 plugin[video].playvideo("myfilename.mp4|myfilename.webm");  
);


Piotr
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

3

Freitag, 23. Dezember 2016, 08:31

I ended up with understanding how to use the calc function and solved it like this:

Quellcode

1
videourl="calc:_video_prefix + videos[get(xml.scene)].file + '.mp4|' + _video_prefix + videos[get(xml.scene)].file + '.webm'"


I had an array that contained the videofilenames, using the current locations name as index.

Quellcode

1
<videos name="scene_stue" file="stue"/><videos name="scene_hall" file="hall"/><videos name="scene_ute" file="ute"/>


Perhaps it could be helpfull for someone else sometime!

Ähnliche Themen