latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

JW Player/Video doesn't work on IOS Devices

Home Forums Community Forum JW Player/Video doesn't work on IOS Devices

This topic contains 11 replies, has 3 voices. Last updated by  Philly 3 years, 5 months ago.

Topic Author Topic
Posted: Wednesday Jul 31st, 2013 at 8:00 pm #54542
Michael
Username: emptyo

Hi!

I’m pulling (what’s left of) my hair out trying to get my videos to load on ios devices.

I’ve got S2 Member going to an Amazon Cloudfront/S3 implementation. Vids are all HD. Here’s my embed code:



<div id="jw-container">JW Player® appears here.</div>
&lt;script type=&quot;text/javascript&quot; src=&quot;jwplayer.js"&gt;


$s2_jw_config["mp4_video_file_name"], "url_to_storage_source" =&gt; true, "count_against_user" =&gt; true); ?&gt;


&lt;?php // API Function <span class="s2-hilite s2-mono">s2member_file_download_url()</span> returns false if access is denied to the current User.
if (($mp4 = s2member_file_download_url ($cfg, "get-streamer-array"))) { ?&gt;


   
       jwplayer('jw-container').setup({
               playlist:
                   [{
                       sources: // List all available sources.
                           [
                               {type: 'rtmp', file: '/mp4:'},
                               {type: 'mp4', file: ''}
                           ]
                   }],
               primary: 'flash' /* Try Flash® RTMP first, fallback on HTML5 or direct download of MP4 file. */,
               width: 640, height: 360 // Set video dimensions for all sources.
           });
   



   Sorry, you do NOT have access to this file.

I’m about at wit’s end here…and ready to outsource this fix if anyone can help. Thanks!

Michael

List Of Topic Replies

Viewing 11 replies - 1 through 11 (of 11 total)
Author Replies
Author Replies
Posted: Wednesday Jul 31st, 2013 at 11:18 pm #54557
Moderator

Try adding a new source like this. Does it work then?

{type: 'html5', file: '<?php echo $mp4["url"]; ?>'}

See also: http://stackoverflow.com/questions/7223366/streaming-mp4-to-ios-not-working-with-jwplayer-and-cloudfront

Posted: Thursday Aug 1st, 2013 at 4:36 pm #54658
Michael
Username: emptyo

No go…but I’ll check out that link. Thanks!

Posted: Thursday Aug 1st, 2013 at 5:24 pm #54661
Michael
Username: emptyo

Does anyone know of a freelance developer or someone I could get to look at my code/setup and help me with it?

Posted: Thursday Aug 1st, 2013 at 6:20 pm #54665

Hi Michael,

What is the error you’re getting?
What version of jw are you using?

Try the code below, its not going to fix anything just help debug this, it will render a direct link, click on it and the ios device should start playing in quicktime or whatever it is.

Have you a link you can share?

<?php
// Configuration.
$s2_jw_config["jwplayer"] = "/jwplayer/"; // Relative URL path to JW Player files directory.
$s2_jw_config["mp4_video_file_name"] = "chapter_5.mp4"; // Name of your MP4 test file.
// Don't edit anything else below unless you know what you're doing.
?>
<div id="jw-container">JW Player® appears here.</div>
<script type="text/javascript" src="<?php echo $s2_jw_config["jwplayer"]; ?>jwplayer.js"></script>


<?php // A direct URL to the RTMP source; counting the file against the current User in real-time.
$cfg = array ("file_download" => $s2_jw_config["mp4_video_file_name"], "url_to_storage_source" => true, "count_against_user" => true); ?>


<?php // API Function <span class="s2-hilite s2-mono">s2member_file_download_url()</span> returns false if access is denied to the current User.
if (($mp4 = s2member_file_download_url ($cfg, "get-streamer-array"))) { ?>


   <script type="text/javascript">
       jwplayer('jw-container').setup({
               playlist:
                   [{
                       sources: // List all available sources.
                           [
                               {type: 'rtmp', file: '<?php echo $mp4["streamer"]; ?>/mp4:<?php echo $mp4["file"]; ?>'},
                               {type: 'mp4', file: '<?php echo $mp4["url"]; ?>'}
                           ]
                   }],
               primary: 'flash' /* Try Flash® RTMP first, fallback on HTML5 or direct download of MP4 file. */,
               width: 640, height: 360 // Set video dimensions for all sources.
           });
   </script>
   
   You have access lets try a <a href="<?php echo $mp4["url"]; ?>">direct link </a>.


<?php } else /* Access is denied to the current User. */ { ?>
   Sorry, you do NOT have access to this file.
<?php } ?>
Posted: Thursday Aug 1st, 2013 at 6:33 pm #54668
Michael
Username: emptyo

Can I PM you a login/password? It’s part of an online course.

Posted: Thursday Aug 1st, 2013 at 6:35 pm #54669
Michael
Username: emptyo

Let me make a test page that’s public.

Posted: Thursday Aug 1st, 2013 at 6:35 pm #54670

you can email ___________ but please note I’m not part of s2 but am happy to have a quick look

Posted: Thursday Aug 1st, 2013 at 6:42 pm #54673
Michael
Username: emptyo

Thanks Philly.

Here’s a test page: http://socialmedianetworkmarketinghq.com/test-page/

I think we had about the same code. The error is: “Error Loading Media: File could not be played”

Posted: Thursday Aug 1st, 2013 at 6:53 pm #54675

I’m not able to access that video because its restricted to at least level 1.

Anyway what happens when you click on the ‘You have access lets try a direct link .’ on an ios device?

And currently its playing without problems on the desktop?

Posted: Thursday Aug 1st, 2013 at 7:01 pm #54678
Michael
Username: emptyo

Hmm, I thought I made it no restriction. Let me double check.

Thanks again

Posted: Thursday Aug 1st, 2013 at 7:02 pm #54679

the page is not restricted but downloads are unlimited to level 1 and above, so restricted for me

Viewing 11 replies - 1 through 11 (of 11 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.