MozillaZine

Firefox 57.0a1 Does Not Play HTML5 Audio for MP3 file

Discussion about official Mozilla Firefox builds
therube

User avatar
 
Posts: 17539
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted August 13th, 2017, 6:58 am

You have an extra / (before the >) that EXAMPLE does not have - should that matter?

> type="audio/wav">

> type="audio/mp3" />


Also is "audio/mp3" correct or should it be something like "audio/mpeg"?
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

amanti
 
Posts: 27
Joined: November 12th, 2012, 8:42 pm

Post Posted August 14th, 2017, 6:07 am

therube:

The Oracle JDeveloper IDE requires the " /> ".
The file type is " .mp3 " ( and not .wav ).
"audio/mpeg" does not work either.

Did you try to play a local MP3 file ?

Michael
Firefox 57.0 / Oracle JDeveloper 12.2.1.2 / ADF / WebLogic & GlassFish / Java SE 8u101 / Windows 8.1 Pro & Linux

therube

User avatar
 
Posts: 17539
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted August 17th, 2017, 6:44 pm

Works fine once the code is changed a bit.
(I have no idea what is right, but prefixing file:\\\ to the mp3 file link got it to work.)
Code: Select all
<audio controls="controls" xmlns="http://www.w3.org/1999/xhtml">
<source src="file:\\\M:\Melanie\Melanie Safka\What Have They Done To My Song Ma.mp3"
type="audio/mp3"/>
</audio>


Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>dumy</title>
  </head>

    <br>

<audio controls="controls" xmlns="http://www.w3.org/1999/xhtml">
<source src="file:\\\M:\Melanie\Melanie Safka\What Have They Done To My Song Ma.mp3"
type="audio/mp3"/>
</audio>

    <br>

 <audio controls>
  <source src="horse.ogg" type="audio/ogg">
  <source src="file:\\\M:\Melanie\Melanie Safka\What Have They Done To My Song Ma.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>

  </body>
</html>
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

amanti
 
Posts: 27
Joined: November 12th, 2012, 8:42 pm

Post Posted August 18th, 2017, 3:55 pm

therube:

Thanks for giving that a try.

I did right click on my *.mp3 file and selected Properties and changed 2 items:
1) I associated the file / type with Firefox 57 ( and alternatively Windows Media Player ).
2) " This file was copied from another computer and may be blocked. Click button to unblock. '
( probably not an exact quote, but close. I unblocked / clicked it ).

For my Oracle ADF Application, my homePage.jsf header is this...
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html>
<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich" >
<af:document title="homePage.jsf" id="d1" >
<af:form id="f1">
<af:pageTemplate viewId="/templateDef1.jsf" id="pt1">
<f:facet name="facet_top">

I've not been successful with using the <audio> tag to play local *.mp3 files.
Therefore, I am planning on posting to the Oracle JDeveloper and ADF forum...
https://community.oracle.com/community/ ... er_and_adf

If anyone here is using the Oracle JDeveloper IDE version 12.2.1.2 and developing an ADF application,
please try using <audio> to play a local *.mp3 and share your findings.

As a workaround, I'm using the af:media component...
<af:media source="waterFromStillBoatPerspective.mp3" id="m1" controls="none" autostart="true" rendered="true"/>
Firefox 57.0 / Oracle JDeveloper 12.2.1.2 / ADF / WebLogic & GlassFish / Java SE 8u101 / Windows 8.1 Pro & Linux

amanti
 
Posts: 27
Joined: November 12th, 2012, 8:42 pm

Post Posted August 19th, 2017, 12:53 pm

therube :

Just a comment on your findings...
> <source src="file:\\\M:\Melanie\Melanie Safka\What Have They Done To My Song Ma.mp3"

I don't think this, a complete pathname, is the expected behavior desired by Java EE because
this is not platform independent.
If the War or Ear file is deployed to a Linux machine, the pathname is incorrect.

I'm quite certain somewhere in the Java EE specs ( and books ), it is specified
that the default file location should be the public_html directory or
RELATIVE to the public_html directory.
Firefox 57.0 / Oracle JDeveloper 12.2.1.2 / ADF / WebLogic & GlassFish / Java SE 8u101 / Windows 8.1 Pro & Linux

Return to Firefox Builds


Who is online

Users browsing this forum: No registered users and 3 guests