Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.BETA, 4.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 4
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial

      Description

      This component renders an HTML5 audio element. The component can be bound to a variety of source types. Playback options can be controlled. JSF Resource management options are also available.

        Issue Links

          Activity

          Hide
          Cruz Miraback added a comment - - edited

          ICEfaces4 trunk revision# 40068 Test Results
          Test app is located at: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Manual/audioPlayer

          1) The audio does not play on page load when using autoplay=true.

          2) Setting the value attribute to null or an empty string throws an exception:
          SEVERE: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
          at java.lang.String.charAt(String.java:658)
          at com.sun.faces.application.view.MultiViewHandler.getResourceURL(MultiViewHandler.java:383)
          at javax.faces.application.ViewHandlerWrapper.getResourceURL(ViewHandlerWrapper.java:291)
          at org.icefaces.impl.application.ExternalServletContextSetup.getResourceURL(ExternalServletContextSetup.java:43)
          at org.icefaces.ace.util.MediaPlayerUtils.processStaticSrc(MediaPlayerUtils.java:67)
          at org.icefaces.ace.util.MediaPlayerUtils.processSrcAttribute(MediaPlayerUtils.java:92)
          at org.icefaces.ace.util.MediaPlayerUtils.deriveAndSetSourceAttribute(MediaPlayerUtils.java:53)
          at org.icefaces.ace.component.audioplayer.AudioPlayerRenderer.encodeEnd(AudioPlayerRenderer.java:44)
          at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919)
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1903)
          at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
          at org.icefaces.impl.renderkit.RendererWrapper.encodeChildren(RendererWrapper.java:49)
          at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889)
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1896)
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1899)
          at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:162)
          at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:1004)
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1896)
          at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:425)
          at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
          at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
          at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
          at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
          at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
          at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
          at java.lang.Thread.run(Thread.java:722)

          3) The url attribute is not being used at all, even if the value attribute is not present the URL attribute does nothing.

          4) Changing the value attribute dynamically when using a byte array does nothing, the audio source stays as what it was originally. No dynamic issues when using a filename or JSF resource as the value.

          5) In the add row to top/bottom tests, sometimes adding rows will case the audioPlayers on the page to disappear. They don't show up again unless you clear the cache and reload the page. In the console there is a warning:
          Media resource (url-to-file) could not be decoded.

          6) Sometimes when playing the audio, clicking ahead on the time bar will make the time indicator jump to the end of the clip and stop playing. After this the audio cannot be played unless you reload the page. This only seems to occur with certain audio clips (can reproduce this on the dynamic attribute test page with the 'Around The World' clip).

          7) Need more info / further test instructions on the scope attribute.

          Show
          Cruz Miraback added a comment - - edited ICEfaces4 trunk revision# 40068 Test Results Test app is located at: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Manual/audioPlayer 1) The audio does not play on page load when using autoplay=true. 2) Setting the value attribute to null or an empty string throws an exception: SEVERE: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:658) at com.sun.faces.application.view.MultiViewHandler.getResourceURL(MultiViewHandler.java:383) at javax.faces.application.ViewHandlerWrapper.getResourceURL(ViewHandlerWrapper.java:291) at org.icefaces.impl.application.ExternalServletContextSetup.getResourceURL(ExternalServletContextSetup.java:43) at org.icefaces.ace.util.MediaPlayerUtils.processStaticSrc(MediaPlayerUtils.java:67) at org.icefaces.ace.util.MediaPlayerUtils.processSrcAttribute(MediaPlayerUtils.java:92) at org.icefaces.ace.util.MediaPlayerUtils.deriveAndSetSourceAttribute(MediaPlayerUtils.java:53) at org.icefaces.ace.component.audioplayer.AudioPlayerRenderer.encodeEnd(AudioPlayerRenderer.java:44) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1903) at javax.faces.render.Renderer.encodeChildren(Renderer.java:176) at org.icefaces.impl.renderkit.RendererWrapper.encodeChildren(RendererWrapper.java:49) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1896) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1899) at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:162) at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:1004) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1896) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:425) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) 3) The url attribute is not being used at all, even if the value attribute is not present the URL attribute does nothing. 4) Changing the value attribute dynamically when using a byte array does nothing, the audio source stays as what it was originally. No dynamic issues when using a filename or JSF resource as the value. 5) In the add row to top/bottom tests, sometimes adding rows will case the audioPlayers on the page to disappear. They don't show up again unless you clear the cache and reload the page. In the console there is a warning: Media resource (url-to-file) could not be decoded. 6) Sometimes when playing the audio, clicking ahead on the time bar will make the time indicator jump to the end of the clip and stop playing. After this the audio cannot be played unless you reload the page. This only seems to occur with certain audio clips (can reproduce this on the dynamic attribute test page with the 'Around The World' clip). 7) Need more info / further test instructions on the scope attribute.
          Hide
          Arturo Zambrano added a comment - - edited

          Fixed issues #2 and #3 at revision 40120.

          Show
          Arturo Zambrano added a comment - - edited Fixed issues #2 and #3 at revision 40120.
          Hide
          Arturo Zambrano added a comment -

          Fixed issue #4 at revision 40121. Since the src url is always the same when using a byte array resource, a data-hashcode attribute was added to the main element to force an update whenever the byte array value changes and thus reload the correct content.

          Show
          Arturo Zambrano added a comment - Fixed issue #4 at revision 40121. Since the src url is always the same when using a byte array resource, a data-hashcode attribute was added to the main element to force an update whenever the byte array value changes and thus reload the correct content.
          Hide
          Arturo Zambrano added a comment -

          Fixed issue #1 at revision 40123. Added support for the autoplay attribute, which wasn't being supported.

          Show
          Arturo Zambrano added a comment - Fixed issue #1 at revision 40123. Added support for the autoplay attribute, which wasn't being supported.
          Hide
          Arturo Zambrano added a comment -

          Could not reproduce issue #5. It was possibly indirectly fixed by previous fixes.

          Show
          Arturo Zambrano added a comment - Could not reproduce issue #5. It was possibly indirectly fixed by previous fixes.
          Hide
          Arturo Zambrano added a comment -

          As for issue #6, the functionality of the audio player itself is outside of our reach, since it's a native browser feature. I couldn't reproduce the issue on Chrome, though.

          Show
          Arturo Zambrano added a comment - As for issue #6, the functionality of the audio player itself is outside of our reach, since it's a native browser feature. I couldn't reproduce the issue on Chrome, though.
          Hide
          Cruz Miraback added a comment - - edited

          ICEfaces4 trunk revision# 40274

          Confirmed #1 and #2 are fixed.

          For #3, the URL attribute works now but it doesn't when the value attribute is not specified at all. For example, if you just have this it will not work:
          <ace:audioPlayer id="audioPlayer" url="url/to/audio/source"/>
          But if you add in the value attribute like this it will:
          <ace:audioPlayer id="audioPlayer" value="" url="url/to/audio/source"/>
          Is this expected behaviour?

          #4 can still be reproduced. I can see the data-hashcode changing but the audio played back is the original audio. This can be reproduced in the test app at audioPlayer/audioPlayerByteArray.jsf.

          #5 can still be reproduced. I was able to reproduce by adding 10-15 extra rows to the table. I'm adding quite quickly, after each new row is visible on the page I add a new one.

          #6 can still be reproduced (in Firefox) but as you say, this may not be in the scope of what we can fix.

          #7 - Confirmed scope attribute is working as expected for 'session' and 'application' scopes using the provided test instructions (thanks). However, this is only when using byte array as the source, the scope attribute currently does not function when using a JSF resource as the value.

          Show
          Cruz Miraback added a comment - - edited ICEfaces4 trunk revision# 40274 Confirmed #1 and #2 are fixed. For #3, the URL attribute works now but it doesn't when the value attribute is not specified at all. For example, if you just have this it will not work: <ace:audioPlayer id="audioPlayer" url="url/to/audio/source"/> But if you add in the value attribute like this it will: <ace:audioPlayer id="audioPlayer" value="" url="url/to/audio/source"/> Is this expected behaviour? #4 can still be reproduced. I can see the data-hashcode changing but the audio played back is the original audio. This can be reproduced in the test app at audioPlayer/audioPlayerByteArray.jsf. #5 can still be reproduced. I was able to reproduce by adding 10-15 extra rows to the table. I'm adding quite quickly, after each new row is visible on the page I add a new one. #6 can still be reproduced (in Firefox) but as you say, this may not be in the scope of what we can fix. #7 - Confirmed scope attribute is working as expected for 'session' and 'application' scopes using the provided test instructions (thanks). However, this is only when using byte array as the source, the scope attribute currently does not function when using a JSF resource as the value.
          Hide
          Arturo Zambrano added a comment -

          Committed fix for url attribute issue at revision 40321. Improved documentation to specify that the scope attribute is only applicable when using a byte array or an instance of IceOutputResource as the value.

          I could not reproduce issues #4 and #5 still. Can you please provide more details on how to reproduce it? Does it happen in the a desktop or mobile environment? Which browser was used?

          Show
          Arturo Zambrano added a comment - Committed fix for url attribute issue at revision 40321. Improved documentation to specify that the scope attribute is only applicable when using a byte array or an instance of IceOutputResource as the value. I could not reproduce issues #4 and #5 still. Can you please provide more details on how to reproduce it? Does it happen in the a desktop or mobile environment? Which browser was used?
          Hide
          Arturo Zambrano added a comment -

          Also added some missing dots in resource paths in the test application at revision 37602.

          Show
          Arturo Zambrano added a comment - Also added some missing dots in resource paths in the test application at revision 37602.
          Hide
          Cruz Miraback added a comment -

          ICEfaces4 trunk revision# 40321

          Confirmed #3 (url attribute issue) is completely fixed.

          #4 can no longer be reproduced, issue is resolved.

          For #5, upon further investigation I can only reproduce this in Firefox (27). I've attached a screenshot of what I see.
          To reproduce:
          1) Navigate to audioPlayer/audioPlayerAddTableTop.jsf or audioPlayer/audioPlayerAddTableBttm.jsf
          2) Click add button rapidly (10-15 times)

          For #7 I changed the test page to use IceOutputResource instead of javax.faces.Resource but I still only get successful test results for the scope attribute for the byte array example. Updated test is checked in.

          Show
          Cruz Miraback added a comment - ICEfaces4 trunk revision# 40321 Confirmed #3 (url attribute issue) is completely fixed. #4 can no longer be reproduced, issue is resolved. For #5, upon further investigation I can only reproduce this in Firefox (27). I've attached a screenshot of what I see. To reproduce: 1) Navigate to audioPlayer/audioPlayerAddTableTop.jsf or audioPlayer/audioPlayerAddTableBttm.jsf 2) Click add button rapidly (10-15 times) For #7 I changed the test page to use IceOutputResource instead of javax.faces.Resource but I still only get successful test results for the scope attribute for the byte array example. Updated test is checked in.
          Hide
          Arturo Zambrano added a comment -

          Resolving JIRA. Issues #5 and #7 were spun off to ICE-9920 and ICE-9921.

          Show
          Arturo Zambrano added a comment - Resolving JIRA. Issues #5 and #7 were spun off to ICE-9920 and ICE-9921 .

            People

            • Assignee:
              Arturo Zambrano
              Reporter:
              Ken Fyten
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: