It seems the audip-player.swf will not appear unless 'both' of the js files below are in the page. Take away swfobject.js and the audio player will display only the 'Audio placeholder'
After a few hrs too many digging around I was able to discover this weirdness and then hack asset_bonus.module so I could play both .mp3 and .flv files in a single page, but clearly this needs to be fixed by an expert...
Comments
Comment #1
wmostrey commentedIt's unclear what 2 js files you're talking abouht: swfobjects and...?
Comment #2
sijuwi commentedOh dear looks like the js paths were stripped from the post, here goes again:
/modules/asset/asset_bonus/swfobject/swfobject.js
/modules/asset/asset_bonus/audioplayer/audio-player.js"
Comment #3
wmostrey commentedI notice two things: you're using alpha2 so you're advised to upgrade to the latest dev version (an alpha3 is coming soon). Also, isn't it normal that swfobject.js is required since that loads the flash file.
I wonder what behavior you are/were getting: you add only 1 file, being an mp3 file, and it wouldn't show? You were getting only the "Audio placeholder" message?
Comment #4
sijuwi commentedFor the Alpha2 version I uploaded a mp3 file which is 'played' by the audio-player.swf and is controlled by the '/modules/asset/asset_bonus/audioplayer/audio-player.js' file only.
Only a placeholder was visible, until, I made sure the '/modules/asset/asset_bonus/audioplayer/swfobject.js' was available in the node too. But this file is exclusively for swfobjects ie .flv files and not mp3 files (and its player despite being a swf file).
I've since updated to the latest dev version and found it works better but with other small problems/conflicts that may or may not be related.
There seems to be some minor javascript issues, where the sizing of the swfobject is lost in subsequent edits of the node. Also when placing a .flv file and .mp3 file together in a node cause some problems where the audio file will show up only as a placeholder when appearing 'after' the .flv file.
Comment #5
wmostrey commentedI'm moving this issue to the dev branch then. When you say you're adding an flv and an mp3, are you doing this with CCK, with a textarea using "Insert Asset" or using TinyMCE?
Comment #6
wmostrey commentedSijuwi, do you have a site online where one of the assets is showing up as a placeholder? Does this happen in both IE and FF?
Comment #7
sijuwi commentedI've tried to reproduce the placeholder issue again.
Procedure as follows:
Firefox 2..
*Go into the asset wizard from the icon on the tinymce bar
*Add a mp3 file >> successfully inserted into tinymce
*Go into the asset wizard from the icon on the tinymce bar
*Add a .flv file >> size accordingly >> successfully inserted into tinymce
*Submit node - views exactly as it should be
*Go back into node edit
*move the mp3 file by dragging it below the .flv file
*Submit node
*The .flv file has lost its sizing
*Both files still visible with players
*Return to edit node
*Return the mp3 file back above the .flv file
*Submit node
*Now the mp3 (loses its js file in source) is a placeholder but .flv still ok but without sizing
*Return to edit node
*Select mp3, click asset wizard icon, follow sequence to insert
*Do the same with the .flv file
*Mission accomplished all files back to what they should be
Explorer 7
*Go into the asset wizard from the icon on the tinymce bar
*Add a mp3 file >> successfully inserted into tinymce
*Go into the asset wizard from the icon on the tinymce bar
*Add a .flv file >> size accordingly >> successfully inserted into tinymce
*Submit node - mp3 is a place holder, .flv views correctly
http://www.torturecare.org.uk/1379
There are other variations, ie when returning to the edit node, playing around with positioning, in some circumstances i can get explorer 7 to work for both.
Hope this is all clear.
Comment #8
sijuwi commentedYes with cck
Comment #9
wmostrey commentedThanks so much for posting this information sijuwi, this helps so much. Looking at your sourcecode, I can now see what's happening. I'm afraid this is a TinyMCE issue and that there's not much I can do about it. By moving those two files around like that, it seems that at some point the inclusion of
/modules/asset/asset_bonus/swfobject/swfobject.jsactually happens below the audio file instead of above it, as happened when inserting it. WIth this information I tend to mark this as a "won't fix" since there really is not much I can do about it.Is your current solution for fixing this, by re-saving the assets, workable for you?
Comment #10
sijuwi commentedYes it all works well enough for our purposes though the ultimate goal at some point is to get it all working consistently for all assigned editors to add video and audio themselves without to many quirks.
Thanks!
Comment #11
wmostrey commentedOK, I'm marking this as "won't fix" because this really is a TinyMCE issue. If you want more strict control over your assets I can always suggest using the multiple-value cck fields.
Comment #12
yched commentedI'm also seeing erratic cases where swfoject.js fails to be loaded.
Sometimes when viewing a node, sometimes when previewing in the wizard,
sometimes in a node edit form with the cck asset field...
(isolating accurate reproducible steps is uneasy)
Maybe a (temporary ?) fix would be more permissive inclusion of the swfoject.js file ?
Say, asset_bonus_asset_formatter() is called, whatever the op ?
Or at worst, on every page ?
Not ideal, but would make sure all cases are covered...
Comment #13
jasonwhat commentedI'm getting this also. The first time I load the node it appears normal. The next refreshes it isn't and I have to reinsert the asset.