zpmobile issues

The mobile plugin seems to be working well. Having a problem with the zpmobile theme for video and audio files.

The problem I was seeing is that if I have an album of videos, when in the album page and clicking on a video it seemed to lockup. It would never show the image page with the video.

I've modified the section of image.php as follows:

<?php
if(isImagePhoto()) {
?>
<img src="<?php echo pathurlencode(getDefaultSizedImage()); ?>" alt="<?php echo getBareImageTitle(); ?>" style="max-width:<?php echo getDefaultWidth(); ?>px"/>
<?php
} elseif(isImageVideo() && getOption('zpmobile_mediadirectlink')) {
// mp3 files in the album also end up here...seems to kind still work ok...plya button doesn't work, but click on scrollbar plays audio
$videoThumb = $_zp_current_image->objectsThumb;
if (!empty($videoThumb)) {
$album = $_zp_current_image->getAlbum();
$albumfolder = $album->name;
$videoThumb = getAlbumFolder(WEBPATH).pathurlencode($albumfolder.'/'.$videoThumb);
}
$vid = '<p><video src="';
$vid .= pathurlencode(getUnprotectedImageURL());
$vid .= '" poster="';
$vid .= $videoThumb;
$vid .= '" width="300" controls preload onclick="this.play();"> Your browser does not support video/audio.</video></p>'; //this line old
// autoplay working in Chrome/Windows and on iOS6 Iphone4s. Android Gingerbread, Jellybean not autoplaying in default browser or Chrome
//in CHrome if autoplay, navigating to different page..video's audio can still be heard!
//$vid .= '" width="300" preload controls="controls" autoplay="autoplay" onclick="this.play();"> Your browser does not support video/audio.</video></p>';
echo $vid;
} else {
printDefaultSizedImage(getImageTitle());
}
?>

Few question. I'm not clear what the zpmobile_mediadirectlink setting in the theme options was supposed to be for, but here I am using it to put in an HTML 5 video tag instead of using flowplayer.

Wondering if anyone has any thoughts on the above??

Comments

  • acrylian Administrator, Developer
    Flowplayer is probably not working because it is flash based and that will not work on iDevices at all. There is an iphone/ipad extension for it included but lacking those devices I cannot test them.

    You should try to use jPlayer instead which uses html5 if applicable. Be sure to read the documentation about the file formats.

    The zpmobile_direktmedia link is meant to print a direct link to the video/audio file in case the player does not work (there are lots of different systems/versions and devices so you never know it really does). So this way you can request the device to take over how it fits best.
  • Thanks. Will give jPlayer a try.
    I was also testing on an Android device with Flash installed. There problem was that I wasn't even getting to the image (video) page. It seemed to be locking up somewhere.

    Also have tested on Chrome on Jelly Bean on a Google Nexus and the theme colours are all messed up. It's got a black background and generally does not look very good. The stock Android browser and Dolphin browser work as expected.

    For the direct link, is there any case where a device can do anything with the non-image links??
  • acrylian Administrator, Developer
    If theme colors are messed up you have some errors on your server maybe or in a browser log if there is any? Can you try the demo on our site? (you can switch themes there to try the theme).

    We have no means to test all kind of devices - there too many and many versions - and have to believe the jQuery mobile guys what they say about combatibility (please review on their site about the support status of your device. Note that the theme currently does not use the current script. It is a quite plain usage of their script. It might be that there are conflicts with other scripts Zenphoto uses on themes but besides a display glitch of the rating plugin I don't know of any.

    For the direct link, is there any case where a device can do anything with the non-image links??
    You mean the full link to the video? Depends on the device. iDevices should be able to open mp4 videos (depending on the codec) directly actually.
Sign In or Register to comment.