Trying To Embed An S3 CloudFront Distribution Video In A Simple Page

0

Hello All,

I have created a simple CF Distribution for a video. I upload the mp4, the Cloud does its magic, and creates 206 files, including the msu8 file. I test the distribution in the Akami HLS tester. Works like a champ.

I try to embed the video in a very basic html file. When I load the page in a browser, I get the border of the ivs Player but nothing is inside of it. No controls. No video. Just empty space surrounded by the border. I am guessing I am missing some css or linked code or some such. I can't find a demo to check against. Below is my code. Thanks for your time and any help:

https://maryjanescientific.com/code.pdf

  • Do you see any output in the browser console that might indicate a problem?

    If you load the PHP file directly in the browser (instead of into an iframe) does the video load as expected?

Redbone
demandé il y a 2 ans1526 vues
2 réponses
2
Réponse acceptée

First of all, your demo-video.php page is just another HTML page. I can only see an HTML file embedded in another HTML file via iframe.

I'm not sure where you have hosted this HTML page but The Same Origin Policy prevents you from interacting with content loaded into an iframe from a different domain.

Two possibilities that you need to check:

  1. In order to work, you need to add CORS for the S3 bucket where you have stored all your videos.
  2. If you restrict viewer access settings in CloudFront, then viewers must use CloudFront signed URLs or signed cookies to access your content.
répondu il y a 2 ans
profile picture
EXPERT
vérifié il y a 9 mois
profile pictureAWS
EXPERT
vérifié il y a 2 ans
1

Thanks for the clues. Number two was the correct answer. I clicked the setting without understanding. All better now.

John Ullom

Redbone
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions