0
Version 2 has been great so far but I've got 2 problems I'd like to get help for.
1. I can't seem to get jwplayer plugin to play files with UTF8 characters. I can play files with all English characters fine but not with other languages (mainly Japanese and Chinese)
2. Is there a function to download entire album at once? I remember reading some other threads talking about this but I'm not sure if it's available.
Thanks and keep up the good work!!
1. I can't seem to get jwplayer plugin to play files with UTF8 characters. I can play files with all English characters fine but not with other languages (mainly Japanese and Chinese)
2. Is there a function to download entire album at once? I remember reading some other threads talking about this but I'm not sure if it's available.
Thanks and keep up the good work!!
Responses (15)
-
Accepted Answer
01 - you wont get that working. filenames must be "ASCII" (that is: A-Z, a-z, 0-9 basically): flash players usually do not like other UTF8 characters on filenames... nor the HTTP standards... you have to AVOID this.
2 - there's a field, on the album form, where you can point to a file (a zip file, for instance) that contains the whole album... but that's it. I mean, there's no "automatic" whole album file creation from independant song files, or anything like that -
Accepted Answer
0humm may I suggest adding those 2 functions then? I actually have been using Zina (http://sourceforge.net/projects/zina/) that can achieve both functions. Plus it also allows music files to live outside web root. The only reason I moved to your solution is that I appreciate developer support and the polish of your software. Unfortunately before these can be fixed, I'd have to go back to my original solution or put in some effort to make this work myself. I'll work on this a bit but looks like the first problem is not an easy hack can resolve. (For the second function an on-the-fly gzip would work). -
Accepted Answer
-
Accepted Answer
0Thanks for looking into this!
May I suggest start looking at this thread over at jwplayer forum:
http://www.longtailvideo.com/support/forum/setup-problems/6295/wrong-get-for-url-with-escaped-accent-chars#msg35870
It seems that jwplayer expects UTF-8 encoded a bit differently from HTTP format of UTF-8 characters. I'll dig into this and I'll post more update once I learn more about this issue. -
Accepted Answer
0I've made some progress on the first issue of UTF-8 encoded non-latin characters. Using the code from the website above, I wrote a jwplayer_helper.php as following which involves the encoding code called utf8_jwstr($str).
Then I added the following to line 58 of jwplayer.php:
$filename = utf8_jwstr(MusColHelper::getSongFileURL($song));
$song->filename = $filename;
After modification, I am able to play UTF8 files in individual song view. However, I have not been able to get it working with pages involving xspf functions (such as album view).
I'd appreciate any idea going forward. Thanks -
Accepted Answer
-
Accepted Answer
0Yea I tried that but unfortunately it didn't work.
According to jwplayer documentation, it takes xspf feed in UTF-8 encoding. Therefore modifying view.feed.php to pre-encode the location tag doesn't work.
I tried viewing the xml feed in browser and it seems to be encoded in UTF-8 correctly. I'm not sure what the problem is. Also I tried adding
?xml version="1.0" encoding="UTF-8"? (the brackets omitted here - the forum seems to hate anything related to code lol)
to $feed in xspf.php but somehow the player won't play. Any idea why? Removing htmlspecialchars from xspf.php doesn't help either.
I've pretty much nailed down the issue to the location tag since if a playlist contains both latin and non-latin filenames I will still be able to play the latin ones. Therefore this suggests that the player is able to retrieve the $playlist_url correctly.
May I also ask which version of jwplayer have you bundled with your plugin? -
Accepted Answer
-
Accepted Answer
0OK Good news! I solved the encoding problem!
Turned out that when dealing with xspf playlist the utf8_jwstr trick won't work. Instead it takes standard URI encoding.
So I've made the following change to view.feed.php on line 37:
$song_path_complet = urlencode(MusColHelper::getSongFileURL($song)) ;
$song_path_complet = str_replace('%2F','/',$song_path_complet);
$song_path_complet = str_replace('%3A',':',$song_path_complet);
And BAM it works!! It's kinda bizzare how jwplayer handle these two types of streams so differently...
Now I'll have write my plugin to enable album download. I would appreciate any idea on how to get this started germi BTW maybe you can merge this to your code base B) -
Accepted Answer
-
Accepted Answer
-
Accepted Answer
0hello Justin
question: did you ever find a solution for the folder auto-scanning feature, so it can read and import folder with UTF8 characters on the folders name?
there's a user asking for this, and I just remembered that you dealed with UTF8 issues some time ago!
any help will be much appreciated
Germi -
Accepted Answer
Your Reply
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »