LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
Gurgen
- Posts: 34
- Joined: Thu Dec 10, 2015 2:09 pm
Post
by Gurgen » Fri Dec 11, 2015 12:35 pm
Hi Everyone,
I'm new in this forum and I hope this forum can helps me.
I tried to play mp3 audio file from my local path in livecode browser. The browser is showing HTML5 player but don't playing audio. The HTML that I using in my app working fine in Google Chrome.
-- HTML that I used
Code: Select all
<!DOCTYPE html>
<html><head>
<meta name="viewport" content="width=device-width">
</head>
<body>
<audio controls="" autoplay name="media"><source src="MyAudioLink" type="audio/mp3">
</audio>
</body></html>
-- Livecode
Code: Select all
-- Create valid url for browser
replace space with "%20" in pURL
replace ":/" with "://" pURL
put "file:///" before pURL
-- Get HTML script to playing audio
put field "HTMLField" into tHTML
-- Put the file link into HTML
replace "MyAudioLink" with pURL in tHTML
-- Show audio file on browser
revBrowserSet sBrowserID, "htmlText", tHTML
-
Klaus
- Posts: 13829
- Joined: Sat Apr 08, 2006 8:41 am
- Location: Germany
-
Contact:
Post
by Klaus » Fri Dec 11, 2015 1:14 pm
Hi Gurgen,
1. welcome to the forum!
2. Is this for mobile (iOS/Android) or desktop?
3. Could you please show us the final url (pURL), if possible?
Best
Klaus
-
Gurgen
- Posts: 34
- Joined: Thu Dec 10, 2015 2:09 pm
Post
by Gurgen » Fri Dec 11, 2015 2:15 pm
Thanks for reply,
It is for Desktop
Sure, pURL = file:///D://Damien%20Rice%20Discography%202002-2007%20MP3/2002%20Damien%20Rice%20-%20O/04%20-%20Damien%20Rice%20-%20Cannonball.mp3
-
Klaus
- Posts: 13829
- Joined: Sat Apr 08, 2006 8:41 am
- Location: Germany
-
Contact:
Post
by Klaus » Fri Dec 11, 2015 2:26 pm
Hi Gurgen,
OK, thank you!
Did you use "revBrowserOpen" or "revBrowserOpenCEF" to create a browser instance?
I think only the latter one will open a browser based on the Chrome framework.
Best
Klaus
-
Gurgen
- Posts: 34
- Joined: Thu Dec 10, 2015 2:09 pm
Post
by Gurgen » Fri Dec 11, 2015 2:36 pm
Hi Klaus,
I used "revBrowserOpenCEF", It only showing the player, but doesn't play audio.
-
Klaus
- Posts: 13829
- Joined: Sat Apr 08, 2006 8:41 am
- Location: Germany
-
Contact:
Post
by Klaus » Fri Dec 11, 2015 3:37 pm
Hi Gurgen,
OK, thanks, just made a quick test and doesn't work here either on my Mac!
Maybe a bug? I will search the LC bug database and will report this if not already done.
Will keep you informed!
And back again, yep, this is a known bug, but an old one!?
Time to fix it!
http://quality.livecode.com/show_bug.cgi?id=12803
Best
Klaus
-
[-hh]
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Post
by [-hh] » Sat Dec 12, 2015 12:52 pm
@Klaus
Linux 32bit support is in competition to have a newer Chromium in LC's browser tools,
see the discussion
LC's CEF browser and HTML5.
@Gurgen
revBrowserOpenCEF uses an old Chromium. This old Chromium is also part of the new browser widget of LC 8.
That is, the newest widget "Browser" is not able to display the newest standalone feature "HTML5"
Each and every thing has its very own logic here ...
shiftLock happens