Youtube video playing on browser but not on electron-js app
Asked Answered
A

1

10

I am using plyr.io to run youtube videos from electron-js app as well as browser based app. Few videos are not playing in electron-js app but playing on browser application(Chrome). Is it anything to do with copyright issue?

Below is one video which didn't run on electronjs-app.

Video: https://www.youtube.com/watch?v=aJOTlE1K90k.

API returns the below JSON

 {
     "kind": "youtube#videoListResponse",
     "etag": "\"XI7nbFXulYBIpL0ayR_gDh3eu1k/JJfz5-v19lUQxDHwldoSeJ-hK2Q\"",
     "pageInfo": {
      "totalResults": 1,
      "resultsPerPage": 1
     },
    "items": [
    {
     "kind": "youtube#video",
     "etag": "\"XI7nbFXulYBIpL0ayR_gDh3eu1k/xYxkZIT1J781N7xijLQef_3H6eg\"",
     "id": "aJOTlE1K90k",
     "status": {
      "uploadStatus": "processed",
      "privacyStatus": "public",
      "license": "youtube",
      "embeddable": true,
      "publicStatsViewable": true
     }
    }
  ]
}
Acetabulum answered 23/11, 2018 at 7:52 Comment(0)
S
1

Youtube makes some embedded videos strictly need public domains to run from instead of the localhost environment (ie: embedded video in electron application). try embedding the video on a public domain (jsfiddle for example) and it will work just fine.i remmeber for an opensource project i had to overcome this issue to display full youtube website content in iframe and managed to do it with electron v1.4.3 , didn't find out a way with later electron versions though.

more details can be found here

Spathose answered 1/1, 2021 at 15:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.