I am trying to use JQTouch to create an original mobile site to play a list of audio files. I am trying to make a simple playlist of tracks used in an art exhibition here in the school. Like those roaming tours like you can see when I link to an MP3 file in an unordered list, the browser does not open the file and it starts playing. It just throws garbage text
It is in both a regular web browser as well as in both my iPhone and Android phone. If I specify the link destination as _blank it will work but Opens the file in another window that needs to be closed to return to the mobile site. I prefer a user to just click on the link and the phone has to start playing the audio
I tried to work with the audio tag for HTML5 but they had trouble working. The player will or will not show something similar to the problem shown above.
It is strange that after clicking on the link the browser shows me that link #indifine is
To be fair, I'm not so great with JavaScript, so it can be quite obvious, but by now it has not been able to get rid of me Thanks for the help.
You can see your mockup on
'an mp3 file in html There is no direct link for it and it plays ... You have to do some JavaScript here:
In your script section:
Change
& Lt; Script type = "text / javascript" charset = "UTF-8" & gt; $ .jQTouch ({icon: 'tower_logo.png', statusbar: 'black'}); & Lt; / Script & gt; to
& lt; Script type = "text / javascript" charset = "utf-8" & gt; $ .jQTouch ({icon: 'tower_logo.png', statusbar: 'black'}); $ (Document) .ready (function () {var audio = $ ('# audio'); $ ('# audio1'). Tap (function () {audio.attr ('src', 'audio1.mp3') [0] .play ()}) $ ('# audio2'). Tap (function () {audio.attr ('src', 'audio2.mp3') [0] .play ()})}}; Change
- & lt; / lt; Lt; a href = "audio1.mp3"> item 1
-
- a href = "audio2.mp3" & lt; a href = "audio2.mp3" & lt; / a & gt; & lt; / li & gt; Gt; item 2 & lt; / li & gt; & lt; / ul & gt;
Lt; audio id = "audio" & gt; & lt; / audio & gt; & lt; a href = "#" class = "white button" id = "audio 1" & gt; item 1 & lt; / a & Gt; & lt; a href = "#" square = "w Itabuton "id =" audio 2 "> item 2 look for more details.
Comments
Post a Comment