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!!
Responses (15)
  • Accepted Answer

    Tuesday, March 02 2010, 03:31 PM - #Permalink
    0
    1 - 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
    The reply is currently minimized Show
  • Accepted Answer

    P
    P
    Offline
    Tuesday, March 02 2010, 03:48 PM - #Permalink
    0
    Sorry didn't pay attention to your reply. Fixing it now.

    Thanks
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, March 02 2010, 08:10 PM - #Permalink
    0
    humm 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).
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, March 02 2010, 08:19 PM - #Permalink
    0
    music files outside web root is already on the works, and will be probably available on version 2.1

    I'll study the utf8 filenames thing :)
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, March 02 2010, 10:11 PM - #Permalink
    0
    Thanks 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.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 04 2010, 04:29 AM - #Permalink
    0
    I'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
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 04 2010, 03:21 PM - #Permalink
    0
    uou!

    man, good job!

    to make the same thing on XSPF playlists, the file is

    /components/com_muscol/views/album/view.feed.php

    :) just find the line the MusColHelper::getSongFileURL is and replace it with your trick :)

    you'll have to do this also on search/view.feed.php, and songs/view.feed.php
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 04 2010, 08:55 PM - #Permalink
    0
    Yea 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?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 04 2010, 10:53 PM - #Permalink
    0
    Just a little update

    I replaced player.swf and yt.swf with jwplayer 5 versions but it still doesn't resolve the playlist issue. Still working on a solution...
    The reply is currently minimized Show
  • Accepted Answer

    Friday, March 05 2010, 12:11 AM - #Permalink
    0
    OK 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 :D BTW maybe you can merge this to your code base B)
    The reply is currently minimized Show
  • Accepted Answer

    Friday, March 05 2010, 05:44 AM - #Permalink
    0
    Oops, need one more line of code after urlencode to make sure file with spaces would work:

    $song_path_complet = str_replace('+',' ',$song_path_complet);
    The reply is currently minimized Show
  • Accepted Answer

    Friday, March 05 2010, 03:48 PM - #Permalink
    0
    yeah, you got that right!!!

    yes, its a bit weird how JWPlayer handles the encoding things...

    but you seem to have worked it out!! good job!!

    Germi
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, July 01 2010, 06:54 PM - #Permalink
    0
    hello 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
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, July 01 2010, 08:02 PM - #Permalink
    0
    Yea I did get it working - actually I'm using getID3 library to read UTF8 song info to add to muscol database. I have to go back to take a look at what I've done though since I've moved onto other projects. I'll refresh my memory and get back to you
    The reply is currently minimized Show
  • Accepted Answer

    Reis
    Reis
    Offline
    Saturday, December 18 2010, 08:04 PM - #Permalink
    0
    Was the solution on this thread added to 2.1.0 ?

    thanks
    The reply is currently minimized Show
Your Reply