Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8200158

WCGraphicsManager is losing WCMediaPlayer refs if it is created after succeeded state

XMLWordPrintable

    • web
    • x86_64
    • generic

      FULL PRODUCT VERSION :
      java version "1.8.0_144"
      Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
      Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 10.0.16299.309]

      A DESCRIPTION OF THE PROBLEM :
      Terrible lack of audio support that I and other people have inclined me to het through the `com.sun.webkit` package. We can catch WCMediaPlayer if it belongs to loaded page, but if any video/audio is added by js, WCGraphicsManager creates WCMediaPlayer but the reference is lost in `private WCMediaPlayer fwkCreateMediaPlayer(long nativePointer)` of WCGraphicsManager and it never comes to refMap

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Like in this comment:
      https://stackoverflow.com/a/49433642/3426515
      but with audio created in js by `new Audio()` or `document.body.innerHTML += '<audio id="audio-player" controls="controls" src="' + url + '" type="audio/mpeg">';`

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Add new WCMediaPlayer to refMap in WCGraphicsManager
      ACTUAL -
      Nothing happens

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Access to media by injecting js code

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: