Mediabox and flash

Status
Not open for further replies.
Is there any way to display audio files not using flash? just the standard lightbox use flash or html5? Just realized this app is not going to work on android or ipad or iphone since there is no flash plugins....

Has anyone encountered this or had a reason to find another method for popup and media display?
 
There is a Media visualization, but I never used it. You may want to test it. it's part of Fabrik core plugins files.
 
How are you rendering the audio files? Is it using a simple text element with a URL, and 'guess link type' enabled? Or is it using a file upload element?

When using the field element with 'guess link type', we pretty much just hand it over to Mediabox, which then does whatever mediabox does with that type of file.

If you are using a file upload element, we do an 'embed' for mp3, so it'll get rendered with whatever the browser is configured to use to play those with. However, with the upload element, you can also override how we render any given file type, and use whatever you want. So it would be easy to (say) replace our embed method with an HTML5 link. See the README in ./plugins/fabrik_element/element/custom for details.

If you can't use an upload element, and have to use a field with a URL to some external content, it's possible that we could do some work on the 'guess ink type' code. We haven't done much work on that in a few years, and there's a number of changes and new options for rendering media content we could add in.

What would be your preferred method for playing audio on a mobile device?

-- hugh
 
hmm ill have to take a look. for now the mp3 is rendered using a link in text field using guess link and title option for custom placeholders to display name and some extra info. it works great except for the flash stuff. I would love the same type of render design, just html5. flash is old news and is losing ground these days...

I thought the upload was only for images and such. Did not realize you could do mp3 audio as well. hmm i will have to take a look into that and see if it will work for me. but its how it displays that will be the key.

html5 would be preferred in all instances or have the plugin capable of falling back to something if the phone/table/laptop/pc does not support it.

hwdmediashare (an audio video app for joomla) does everything in html5 now. So there is definitely ways of doing so. My problem atm is i am under a time crunch to get something finished by this coming monday in at least some type of working form...
 
I am using a template for joomla that has its own plugin called rokbox which is very similar to mediabox. If your saying I can override it, maybe i can form the links in such a way to load in that plugin. The popup would be the same but it would be html5.

I will definitely have to look into that tonight.
 
so i can override using the custom link option in the settings? I assume i can put html in there and then use a placeholder to display the file or original link? probably gonna need some help on this one to see if this will work out. This may be a better option anyways because then the user doesn't have to find the file in ftp and link. they can just upload and go. thanks
 
so custom link can be formatted like this then?

Code:
<a data-rokbox href="{bsdb_voicetalent___uploadtest}" data-rokbox-caption="{bsdb_voicetalent___name} - Commercial">Audio</a>

That seems to work mostly. But i get the following errors when i use that and in the display it shows Audio"> so maybe not reading the html correct?

i have a test on http://bakersound.fractik.com

errors:

Warning: DOMDocument::loadXML() [domdocument.loadxml]: Opening and ending tag mismatch: img line 1 and a in Entity, line: 1 in/home/fracti7/public_html/bakersound/components/com_fabrik/models/element.php on line 596

Warning: DOMDocument::loadXML() [domdocument.loadxml]: Opening and ending tag mismatch: a line 1 and span in Entity, line: 1 in/home/fracti7/public_html/bakersound/components/com_fabrik/models/element.php on line 596

Warning: DOMDocument::loadXML() [domdocument.loadxml]: Premature end of data in tag span line 1 in Entity, line: 2 in/home/fracti7/public_html/bakersound/components/com_fabrik/models/element.php on line 596
 
No, you can't do that in the details link, as that's only the href part of an A tag. SO whatever you put in the detail link is put inside the href="..." part of a A tag.

Did you read my previous post about how to customize how a given file type is rendered by the upload element?

-- hugh
 
I did read your post but I guess i was a bit confused. i will go back and re-read and look it up again. So I need to custommize the php to do what I need not in the custom link?
 
btw i do not have that directory.. plugins/fabrik_element/element its the element directory that is missing.. Im using 3.1 is it maybe in another location?
 
So this is what i need to change:

Code:
public function render(&$model, &$params, $file)
    {
        $file = str_replace("\\", "/", COM_FABRIK_LIVESITE . $file);
        $this->output = "<embed src=\"$file\" autostart=\"false\" playcount=\"true\" loop=\"false\" height=\"50\" width=\"200\">";
    }

So i can change the output to use this method:

Code:
<a data-rokbox href="{bsdb_voicetalent___uploadtest}" data-rokbox-caption="{bsdb_voicetalent___name} - Commercial">Audio</a>

Where the href and caption would be set the file uploaded? This code will launch the rokbox plugin from rocket theme which is html5 based.

I may possibly need some help with this as I understand it, but not exactly sure what I need to change to accomplish what I need. hmmm
 
the other issue i have is that the fileupload does not allow me to select a custom title. I need Name - (Commercial, Narrative, Political or Ethnic) to be in the lightbox as it currently is. Not sure if the fileupload will allow me to do so.

Is there a way to make a custom field plugin that will display the mp3 using the rokbox method above? so close but yet so far.. hahaha thank you though for all your help so far. shame because it works beautifully as is but i need html.
 
You could use a display or calc element and pretty much code whatever you need, and then set the fileupload element to hidden. The code example you wrote should work fine.

Alternatively you could make the changes in a custom template with a couple of lines of code.
 
hmm... definitely confused here as to what to do. Tried my method and it doesn't seem to work so i reverted it. realistically if i could just use the standard field, let me user put the link in but render in the rokbox plugin method i would be good to go... any idea on how i can achieve that. Frustrating sometimes that I know enough about coding to read it, and manipulate but sometimes i just don't get it enough to do what i need...

I do thank you all though. the team and forum has been such a great help thus far.. I am so close with this app.. so close :)
 
and i say the field method because it has the title option where fileupload does not... I really need to be able to customize the title that gets displayed in media box and get it to render in html5.. actually any media box these days should be html5 because of apple compatibility..
 
Had you not mentioned Apple I may have helped you..... Only joking. ;)

The beauty of using something like the display \ calc element is that you can pull in any information you want.

So say for instance you had 4 fields to fill out with information such as title, artist, genre, year and then the fileupload, you can merge all that information for your media display. Assuming that the rokbox stuff has somewhere to display it.

I had a look hwdmediashare but it's a paid download so I can't really test anything. From what I can see though, their mediaplayer expects any content to be played to be in their own tables, i.e you need to upload it through hwdmediashare first. This doesn't make it impossible as you could use Fabrik to insert into their tables but it's seems too involved just to play a media file.

Looking at other HTML5 Joomla extensions there are some which fall back on flash if the browser doesn't support HTML5. If you want a wider audience these are probably the ones to go for as like it or not there are a lot of old browsers out there. Again I couldn't test any of them as most of them are paid downloads.

I did find some some by sometechie but their free version isn't very configurable, thereby I couldn't add a title into the player.

http://extensions.joomla.org/extensions/owner/sometechie

However as a guideline their content plugin works like

Code:
{htmlmedia_audio } {htmlmedia_source src="[COLOR=#ff0000]testurl[/COLOR]" type="audio/mpeg" } {/htmlmedia_audio}

This means we only have to change the testurl reference to play some media. The following code pasted into a calc element provides the ability to do this.

PHP:
$play = $data[[COLOR=#ff0000]'z_html5player___upload_raw[/COLOR]'];
$render = '<audio style="width:400px" controls>{htmlmedia_audio } {htmlmedia_source src="http://git.fabriking.com/'.$play.'" type="audio/mpeg" } {/htmlmedia_audio}</audio>';
return $render;

The only code you would have to change is the name of you fileupload and add _raw at the end, so probably bsdb_voicetalent___uploadtest_raw. This also works on the basis that your fileupload is a standard upload and not an AJAX one.

So it would work something like this.

http://git.fabriking.com/index.php?option=com_fabrik&task=details.view&formid=9&listid=9&rowid=1


Of course this is only an example but it shows you how to put it together if you find a suitable player with a content plugin. There is also the option of just finding another player out there on the web that doesn't necessarily have to be a Joomla plugin, you just need to include the relevant files to include them in your Fabrik form.
 
hmmm i will look into this further tonight and see. The rokbox plugin i already have should be 100% fine as I believe it rolls back to flash for older browsers etc. so its just a matter of changing the code in some file to render it that way. Seems file upload would be good but have to do some further testing and see now that you gave me some examples.

I'd also rather have less for the user to do. If they could just upload a file and it automatically is configuerd that would be best.. It would make my life a whole lot easier.

the problem is that I do not have a input for category. (commercial, narrative, political, ethnic) The way the current site is working is i have a placeholder for name (which pulls in the voicetalent name) but then i hard code - commercial, - narrative etc. in the field title option. I do not see a way to do this in the fileupload field unfortunately. Going to see what i can do with the field element as i like that method best right now. I just need to find a way to change the output of the link (that currently opens in media box) to open in rokbox plugin installed.

This is the ouput of the link that i would need as i posted above somewhere

Code:
<a data-rokbox href="file upload path" data-rokbox-caption="{bsdb_voicetalent___name} - Commercial">Audio</a>

So href would need to display the fileupload path.. and then the caption would pull in the record name from a placeholder. i think i have a better understanding of how to do this now but will see. Seems if i change the fileupload and the audio part to look at a custom audio output file and put this code in according to the code in the file i should be ok... just a little ovewhelming.. haha
 
I am getting way confused with this and I do not see a calc element. i see calculations in other elements but not a specific calc element...

Is there anyway I can modify the guess link for audio in the field element to use the above code I have in the post above? rok box is very similar to mediabox so i would assume it should be doable.

os is there just a way to just have a field element, i have a custom link beind it. so when i put a link in the field and save, it renders as the above link? rokbox is installed so as long as the link is formed that way it will work just fine (no other code needed)....

hmmmmm... tried formatting stuff using the fileupload and custom stuff via the readme but keep getting errors when using it unfortunately.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top