How can I add an webcam youtube url in the webcam block? ** Solved **

Today I installed the new version of the pwsdashboard, which actually went very quickly and well :smiley:
Also the automatic update procedure (PWS_updates.php) worked for me.

But how can I add the webcam link below to the webcam block?

See screenshot.

In the previous version this worked with some adjustments in the two webcam…php files.
But in this latest version of the pwsdashboard this is changed, so I don’t know exactly what to do.
I tried a lot of things, but nothing worked, so now I’m out of options.
I have now put everything back to the original version, so that I can start with a clean state.
If possible please provide a step-by-step explanation of how to solve this?

Thanks a lot.

Merry christmas everyone!

Greetings Arie (Netherlands)


The error message is clear: Youtube does not allow this.
Chrome: Cross-Origin Read Blocking (CORB) blocked cross-origin response YouTube

Could you please post the link to the previous version, maybe we can see why it worked there.

Wim

https://www.meteo24-culemborg.nl/pwsWD_old/


That customized one uses an iFrame to display the movie, and that is allowed.
Make a backup/copy of your current pwsWD/webcam_c_block.php
Copy the old webcam_c_block.php to pwsWD/ and test it.

Then we know if some general setting prohibits functioning.
Important change the first line to

<?php   $scrpt_vrsn_dt  = 'webcam_c_block.php|09|2029-12-31|';  # customized version

Just to get a warning when the update script want to replace it.

Wim

That worked!

But enlarging in a new screen doesn’t work?


Yes, we have to upgrade that also.
But i think we now know enough and how we can solve that.
But after Christmas seems soon enough for me.

Wim

Indeed Wim, first Christmas, the rest is for later.
Thank you and wish you a Merry Christmas.

Gr. Arie

Hello Wim,

I did some testing this afternoon and found a solution, but there are probably other ways too.
Displaying the webcam image in the dashboard was already fixed by using the old version of the “webcam_c_block.php”.
The only thing that remained was enlarging.

What I’ve done:

Changed in “PWS_blocks.php” rule 422:

From (rule 422):
$blck_ppp [$script][]   = array ('show' => true,      'popup' => 'image_popup.php?nr=wcam1&lang='.$used_lang,   'chartinfo' => 'popup',    'text' => $cam_txt  );
To:
$blck_ppp [$script][]   = array ('show' => true,      'popup' => '_my_settings/webfilm_popup.php',   'chartinfo' => 'popup',    'text' => $cam_txt  );

Changed in “webfilm_popup.php” rules 24 and 29:

From (rule 24):
die ('Script needs to be adapted to your movie first ') ;
To:
#die ('Script needs to be adapted to your movie first ') ;
From (rule 29):
<iframe src="https://q0ne.dyndns.org:8100/Mjpeg/3?authToken=cb30f183-c49f-4a2f-82d0-5af505b02da4" style="margin: 0 auto; width: 100%; height: 100%; "  frameborder="0" allowfullscreen>
To:
<iframe src="https://www.youtube.com/embed/ulrngHKLaKE?autoplay=1" style="margin: 0 auto; width: 100%; height: 100%; "  frameborder="0" allowfullscreen>

The last sentence is then with the change to the new url “YouTube”.

This works for me, changed also the first sentence in all these files to 09, so that they can be specially checked within the automatic updates.
If there is of course another way in which these files can also go with the automatic updates, then I would like to see that, but if not then it’s also okay, then I have to look for the changes in these eventually new files.
I have already documented for myself the changes, so that’s not the problem.

Thanks a lot for all your work, it looks great again!

Greetings Arie

Very good work. I will set this topic to ** Solved ** then.

And I am very happy that there is at least one WSWIN :smiley: user happily running this dashboard.

Wim