PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Putting download URL into playlist file for Streaming

s2Member Plugin. A Membership plugin for WordPress®.

Putting download URL into playlist file for Streaming

Postby cclambie » June 9th, 2011, 2:51 am

Hi WP users and Developers and s2Member Users,

I would like my users to not "download" the file as such, but to stream it in a Audio Player; Itunes on Iphone and Xiia on Android etc.

I am creating a dynamic PLS file on the fly using the URL and adding &s2member_file_remote=yes to the end.
I am not getting any joy from this - I am using Winamp to test it, but it won't connect.
I guess I need the URL direct to the Amazon S3 with the necessary temporary codes at the end to allow access?
Is there a function I could call to make this happen from within S2 maybe?

Can someone help me with this?
Attachments
CreatePLSforS3.zip
PLS Plugin
(1.8 KiB) Downloaded 61 times
User avatar
cclambie
Registered User
Registered User
 
Posts: 57
Joined: April 8, 2011

Re: Putting download URL into playlist file for Streaming

Postby podcastcoach » June 9th, 2011, 7:13 am

I've been fighting a simliar battle in this forum. Lots of options. I can't any of them to work yet.
viewtopic.php?f=4&t=837
User avatar
podcastcoach
Registered User
Registered User
 
Posts: 7
Joined: June 3, 2011

Re: Putting download URL into playlist file for Streaming

Postby drbyte » June 9th, 2011, 10:22 am

It sounds like a media type issue

http://www.site.com/?s2member_file_down ... remote=yes&type=audio

Now i know s2m supports type=video but not sure about the audio part. You need to have mp3, ogg, wav MIME type configured on your web host

Browsers playback issue...note that FF does not support mp3 playback, it supports ogg. IE8 does

Sam
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010

Re: Putting download URL into playlist file for Streaming

Postby cclambie » June 13th, 2011, 10:13 pm

Hi Sam,
Sorry for long delay - we had a long weekend here in Australia, and I took it :)

I have tried adding the &type=audio parameter to the URL, it doesn't work in either the PLS file or directly putting the link into Winamp.
It does however work in a browser directly, but that downloads the file instead of streaming it in a player (chrome)

Thoughts on how I would make this stream into a default audio player on an Android/iApple?
User avatar
cclambie
Registered User
Registered User
 
Posts: 57
Joined: April 8, 2011

Re: Putting download URL into playlist file for Streaming

Postby cclambie » June 14th, 2011, 1:14 am

Update
The test page - valid for 1 week -
http://tinyurl.com/3l3u59n#truesecrets.com.au

URL created = http://truesecrets.com.au/?s2member_fil ... _time=2400

Browsers:
IE 9 - 503 ( Invalid Key ): Sorry, your access to this file has expired. Please contact Support for assistance.
FF 3.6.17 - 503 ( Invalid Key ): Sorry, your access to this file has expired. Please contact Support for assistance.
Chrome 12.0.7 - Downloads file no problems
Chrome 12.0.7 in incognito mode - downloads no problem

Media Players:
Winamp - 5.6 - [server full] http://truesecrets.com.au/s2member_file_download... etc
VLC 0.9.9 - Your input can't be opened:
VLC is unable to open the MRL 'http://truesecrets.com.au/?s2member_file_download=DimSimMaster.mp3&s2member_file_download_key=2fcb27f5b2336cfa5b73f718671181bc&s2member_file_remote=yes&type=audio&ws_plugin__s2member_amazon_s3_file_expires_time=2400'. Check the log for details.
Itunes 10.2.1 - No error message, just "Not available"

Thoughts on how I would rectify this?
Thanks
C
User avatar
cclambie
Registered User
Registered User
 
Posts: 57
Joined: April 8, 2011

Re: Putting download URL into playlist file for Streaming

Postby drbyte » June 14th, 2011, 10:55 pm

Hi

Sorry for the delays..

Well I looked at the url below and tested against IE9, FF4, chrome and safari..all with 503 errors. did you check your .htaccess file? I would do this too...WP admin and permalink settings and hit the sucker couple of times (Save) ..try again..

Now, not sure how you want vlc or winamp to authenticate the user? let's say I am a member and I want to listen to your podcast, i log in to the site and do what exactly? Or just hit the link on the page and winamp opens up..but how would it know what user to allow and not?

Having said that, I worked with vlc before....not user friendly but it's coming out of the box...

Try this

Create a new .m3u file with the user/pass in each URL

Code: Select all
#!/bin/bash

user=foo
pass=bar

#url=http://truesecrets.com.au/?s2member_file_download=file.m3u
url=$1

function to_auth {
  while read line;do
    echo "$line" | sed "s/http:\/\//http:\/\/$user:$pass@/g"
  done
}

wget -qO- $(echo "$url" | to_auth) | to_auth


Sam
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010

Re: Putting download URL into playlist file for Streaming

Postby cclambie » June 14th, 2011, 11:18 pm

Hi Sam,
Thanks for getting back to me.
So this is the process I am trying to make happen.

1. User pays via PayPal
2. User gets a Authenticated URL with 24 hours access to a selection of pages (Not created as a user)
3. On the page, the user clicks a "play" button, which opens automatically opens the "file" in Winamp/ Itunes/ default program on Android/iApple
** Basically I want it to work like you clicked on "listen" on a online radio station website - program is not relevant here - authenticated access to Amazon via a URL is **
4. User listens to track from AmazonS3
5. User returns to site, visits next page (as directed on page) repeat from Step 3.

I am with you on putting the authentication into the URL, but what Authentication do I need? Amazon? Site page is given to them as a Temp URL that last for 24 hours (that bit is sorted)
I need to give them authenticated access to the AmazonS3 content for the same (approx) 24 hours.
I thought using the "Remote Auth/ Podcasting" parameter "&s2member_file_remote=yes" which is described in the S2Member Download options page.
I have also implemented the advanced download restrictions "&s2member_file_download_key=<?php echo s2member_file_download_key("example-file.zip"); ?>" in order to avoid any hassles as a "non-member" of the site.

So I am now a bit stuck still. User details you appear to talk about are if a user was created, which is not happening in this case.

Thoughts?
User avatar
cclambie
Registered User
Registered User
 
Posts: 57
Joined: April 8, 2011

Re: Putting download URL into playlist file for Streaming

Postby cclambie » June 15th, 2011, 8:09 am

So I have created another page with an unlocked bucket on it.

I have made my plugin create a temp PLS, M3U, RAM and ASX file and put a link to it behind each link. I can successfully connect to each of these file types with relevant programs on my Windows machine. ( I am having issues on my android at the moment, but that is for another forum)
http://tinyurl.com/44u5nee#truesecrets.com.au (valid for 1 week from now)

So - now that I have organised the file and plugin etc... I just need the URL that is in the playlist file to work.
Thoughts?
User avatar
cclambie
Registered User
Registered User
 
Posts: 57
Joined: April 8, 2011

Re: Putting download URL into playlist file for Streaming

Postby cclambie » June 19th, 2011, 3:04 am

I have just recently upgraded to the latest s2Member (Version 110617) however I am still having issues with the download/ URL creation.

Maybe there is a way for me to get a "temp" URL direct from the AmazonS3?
Like you can in Cloudberry Explorer - you just tell it I want a URL to a "hidden" file and ask it to only allow access for say 1 day.
This way it would be a direct link to the file, with the unlock key submitted to Amazon I presume.
I thought this is what S2 was doing, so if I could call a class or method within S2 and get back this URL somehow, that seems it would be the best option for this?
Thoughts?
User avatar
cclambie
Registered User
Registered User
 
Posts: 57
Joined: April 8, 2011

Re: Putting download URL into playlist file for Streaming

Postby cclambie » June 19th, 2011, 3:25 am

FYI
This URl works in a browser to download the file, but not to stream the file in other software, like Winamp, itunes etc.

http://truesecrets.com.au?s2member_file ... type=audio
User avatar
cclambie
Registered User
Registered User
 
Posts: 57
Joined: April 8, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: Majestic-12 [Bot] and 1 guest

cron