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.

iPad and iPhone video trouble

Home Forums Community Forum iPad and iPhone video trouble

Tagged: , ,

This topic contains 9 replies, has 2 voices. Last updated by  Cristián Lávaque 4 years, 5 months ago.

Topic Author Topic
Posted: Tuesday Aug 7th, 2012 at 7:26 am #21354
Lewis Smith
Username: padoc

Hi and thanks for a great product. I’m having a little trouble though. I’ve successfully integrated amazon cloudfront and s2members together and my videos seem to stream brilliantly. However, that’s not the case for iPhone and iPad.

What I get is a screen informing me that there is a problem and it exposes the URL. Exposing the URL is not an issue at the moment but getting the video to work with the HTML 5 fallback is. My code is as follows…..

<?php // Configuration. $s2_jw_config["jwplayer"] = "/jwplayer/"; // Relative URL path to JW Player files directory. $s2_jw_config["mp4_video_file_name"] = "http://panicattacksdoc.com/wp-content/plugins/s2member-files/Panic Attacks Part1.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 `s2member_file_download_url()` 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({modes: /* JW Player®. */ [ /* First try real-time streaming with Flash® player. */ {type: "flash", provider: "rtmp", src: "<?php echo $s2_jw_config["jwplayer"]; ?>player.swf", config: {streamer: "<?php echo $mp4["streamer"]; ?>", file: "<?php echo $mp4["file"]; ?>"}}, /* Else, try an HTML5 video tag. */ {type: "html5", provider: "video", config: {file: "<?php echo $mp4["url"]; ?>"}}, /* Else, this is a safe fallback. */ {type: "download", /* Download the file. */ config: {file: "<?php echo $mp4["url"]; ?>"}} ], /* Set video dimensions. */ width: 640, height: 480, 'image': 'http://panicattacksdoc.com/wp-content/uploads/2012/06/Panic-Attacks-Treatment-clip.png', 'title': 'Part 1 | Introduction', 'logo.position': 'bottom-left', 'logo.file': '/wp-content/uploads/2012/06/PanicAttacksLogo-clearer1.png', 'logo.over': '1', 'logo.out': '0.5', 'logo.link': 'http://panicattacksdoc.com', 'logo.hide': 'false', 'logo.margin': '0', 'stretching': 'none', 'controlbar.position': 'bottom' }); </script> <?php } else /* Access is denied to the current User. */ { ?> Sorry, you do NOT have access to this file. <?php } ?>

I’m not sure what is wrong. I’m a complete noob when it comes to coding for the web. I would greatly appreciate your help, Lewis.

  • This topic was modified 4 years, 5 months ago by  Lewis Smith.

List Of Topic Replies

Viewing 9 replies - 1 through 9 (of 9 total)
Author Replies
Author Replies
Posted: Tuesday Aug 7th, 2012 at 11:12 am #21380
Lewis Smith
Username: padoc

No help from s2member? Need you guys quickly if possible. Sorry but I really am on a short dead-line.

Posted: Tuesday Aug 7th, 2012 at 5:18 pm #21394
Lewis Smith
Username: padoc

Had a thought and need help with it. Doesn’t that sound typical?….lol.

The iPad and iPhone use URL’s to direct files to other apps within the device (I know this because I have used it as an iOS developer).

I put my file in an unrestricted place and safari and the iPad played it perfectly.

Do the rewrite rules interfere with this? Safari will by default use QT to play the files if they are called directly with the URL and unrestricted. I just watched it do this.

I would seriously need the files to be restricted but available to iOS users as we develop for these clients also. Can you help me with this. I am seriously thick when it comes to web development. I can always rewrite a bit of code here and there but I fail here.

I’ll have a check through my old iOS code to tell you how the devices actually call applications with the open url statement when I get the chance. It might be useful in the future.

I would appreciate the quickest response you can possibly give me. A lot depends on the delivery of videos with our site. And security for us and our users is paramount.

Thanks in advance, Lewis.

Posted: Tuesday Aug 7th, 2012 at 7:55 pm #21431
Lewis Smith
Username: padoc

Hello, hello…. is there anybody out there?

Posted: Tuesday Aug 7th, 2012 at 8:00 pm #21432
Lewis Smith
Username: padoc

Need help s2member?

  • This reply was modified 4 years, 5 months ago by  Lewis Smith.
Posted: Wednesday Aug 8th, 2012 at 8:39 am #21494

Hi Lewis.

I looked at your code. I noticed that you entered the URL instead of the name of the file. Also, I’d remove the spaces from your file’s name, use dashes instead. Ah, and if you configured the Amazon integration, then the s2member-files folder won’t be used anymore.

[hilite pre_code]

JW Player® appears here.



[/hilite]

I hope that helps!

Posted: Wednesday Aug 8th, 2012 at 10:10 am #21515
Lewis Smith
Username: padoc

Cristian I think I love you….lol. That fixed it for me perfectly. I nearly had a panic attack myself trying to figure it out. I think I’ll stick to objective-c…. lmao. Thank you so much.

Posted: Wednesday Aug 8th, 2012 at 11:29 am #21523
Lewis Smith
Username: padoc

I’ve just come across another issue. It seems this isn’t working on Firefox.

Posted: Wednesday Aug 8th, 2012 at 2:06 pm #21536
Lewis Smith
Username: padoc

Ooops… Sorry it works perfectly. For some reason Flash was disabled in my Firefox but was a handy little mistake to make. Something for the FAQ page.

Posted: Thursday Aug 9th, 2012 at 4:40 am #21604

I’m glad it solved your problem! Thanks for the update. :)

Viewing 9 replies - 1 through 9 (of 9 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.