1. Mark Montgomery
  2. PowerBuilder
  3. Tuesday, 15 August 2023 19:38 PM UTC

In PB2022, I've added a web browser control to a window with a button that has the following script behind it:

STRING ls_url
LONG ll_return

ls_url = "https://www.youtube.com/watch?v=w-15bjJxh6E"

ll_return = wb_1.Navigate(ls_url)
IF ll_return <> 1 THEN
   MessageBox("Error", "Error " + String(ll_return) + " navigating to " + ls_url, StopSign!)
END IF

 

 

The control goes to YouTube and the video loads, however after clicking Play, there is no sound (it's not muted on the site).  If I open that site from a regular browser, I get sound, so I'm missing something within PowerBuilder.  Probably something simple, but for the life of me, I can't figure out what it is.

In the open event of the application, I put in  WebBrowserSet ("enable-media-stream", "TRUE") even though that seems to be for camera or microphone access, but that didn't help.

In lieu of going to PB2022 R2 and seeing if the same thing happens, is there something I can try?

Thanks,

Mark

 

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 16 August 2023 23:16 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Mark;

  FYI: The Sound works perfectly using your URL in PB 2022 R2 on both my W10 & W11 test machines.  HTH

Regards ... Chris

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 16 August 2023 20:22 PM UTC
  2. PowerBuilder
  3. # 1

You can install PB 2022-R2 and switch between builds on the System Options window.

Comment
There are no comments made yet.
Mark Montgomery Accepted Answer Pending Moderation
  1. Wednesday, 16 August 2023 19:18 PM UTC
  2. PowerBuilder
  3. # 2

Chris,

Thanks for your response.  Can you take that code snippet I originally posted and confirm that it works in 2022 R2?

Thanks,

Mark

Comment
  1. Mark Montgomery
  2. Thursday, 17 August 2023 13:42 PM UTC
John,



I was not aware that I would be able to easily switch back and forth from PB 2022 R2 to PB 2022 MR 1900 as I was told (by someone where I work) that after going to R2, I would NOT be able to go back to 2022 MR 1900 without another uninstall and reinstall. I figured someone at Appeon would be able to spend a few minutes to test the code I provided and if it worked (which Chris verified it does), then I would go ahead with installing PB 2022 R2 and moving forward with my project.



If I had been aware of what Roland stated above, then yes I could've (and would've) installed PB 2022 R2 and done this research myself. Don't really understand why you posted such a snarky response, but hopefully this clarifies my reasoning.



And thanks to Chris and Roland for their helpful responses as I will now install to PB 2022 R2 and hope to have this issue resolved.



Mark



  1. Helpful 1
  1. Miguel Leeuwe
  2. Thursday, 17 August 2023 14:53 PM UTC
Hi Mark,

I totally get what you are saying, but in John's defense: John is a GREAT contributor to the community and very helpful. Some people, simply are lazy and try to get you to do all work and preferably also the coding for them. They don't want to try things for themselves or bother to read any documentation, once they have an open door to do so. You've made it clear that this is not your case, so thanks for your explanation.

So I also totally get where John is coming from. Myself I get snarky too sometimes.

Regards :)
  1. Helpful 1
  1. Armeen Mazda @Appeon
  2. Friday, 18 August 2023 19:24 PM UTC
I agree with Miguel... John didn't know the context and purely from what you wrote asking Chris to test the code snippet it sounded like you may have not realized this is not support portal. Anyway, it's just misunderstanding and we are all community members here so water under the bridge. :-)
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 15 August 2023 19:53 PM UTC
  2. PowerBuilder
  3. # 3

Hi Mark;

 The Chromium Engine in PB 2022 had issues with both sound & microphone. I would highly suggest using 2022 R2's WebView2 engine in the Web Browser control to work around this. HTH

Regards ... Chris 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.