{"action":"created","issue":{"url":"https://api.github.com/repos/bitmovin/bitmovin-player-web-samples/issues/14","repository_url":"https://api.github.com/repos/bitmovin/bitmovin-player-web-samples","labels_url":"https://api.github.com/repos/bitmovin/bitmovin-player-web-samples/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/bitmovin/bitmovin-player-web-samples/issues/14/comments","events_url":"https://api.github.com/repos/bitmovin/bitmovin-player-web-samples/issues/14/events","html_url":"https://github.com/bitmovin/bitmovin-player-web-samples/issues/14","id":324327743,"node_id":"MDU6SXNzdWUzMjQzMjc3NDM=","number":14,"title":"Bitmovin not working in  angular 2+","user":{"login":"PaulCheriyan009","id":12741667,"node_id":"MDQ6VXNlcjEyNzQxNjY3","avatar_url":"https://avatars2.githubusercontent.com/u/12741667?v=4","gravatar_id":"","url":"https://api.github.com/users/PaulCheriyan009","html_url":"https://github.com/PaulCheriyan009","followers_url":"https://api.github.com/users/PaulCheriyan009/followers","following_url":"https://api.github.com/users/PaulCheriyan009/following{/other_user}","gists_url":"https://api.github.com/users/PaulCheriyan009/gists{/gist_id}","starred_url":"https://api.github.com/users/PaulCheriyan009/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaulCheriyan009/subscriptions","organizations_url":"https://api.github.com/users/PaulCheriyan009/orgs","repos_url":"https://api.github.com/users/PaulCheriyan009/repos","events_url":"https://api.github.com/users/PaulCheriyan009/events{/privacy}","received_events_url":"https://api.github.com/users/PaulCheriyan009/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-18T09:03:20Z","updated_at":"2018-10-29T04:13:52Z","closed_at":null,"author_association":"NONE","body":"Bitmovin not working in  angular 2+, I have used npm to install bitmovin.\r\n\r\n>   npm i bitmovin-player\r\n\r\nthe code i user are as follow\r\n`  \r\nimport * as bitmovin from 'bitmovin-player'\r\nconst conf = {\r\n      key: 'c0e00b92-8710-4767-8ba6-97fe45b45135',\r\n     \r\n      source: {\r\n      dash: 'https://testorigin.cinesoft.live/freedrmvod/smil:Billa_2.smil/manifest.mpd',\r\n     //  hls: '********************************',\r\n      drm: {\r\n      widevine : {\r\n      LA_URL: '******************************',\r\n      headers: [{\r\n      name: 'utoken-drm',\r\n      value: 'wv'\r\n      }],\r\n      prepareMessage : function(keyMessage) {\r\n      return keyMessage.message;\r\n      }\r\n      },\r\n      prepareLicense: function(license) {\r\n      return new Uint8Array(license);\r\n      },\r\n      headers: [{\r\n      name: 'Content-type',\r\n      value: 'application/octet-stream'\r\n      },\r\n      {\r\n      name: 'utoken-drm',\r\n      value: 'fp'\r\n      }],\r\n      useUint16InitData: true,\r\n      licenseResponseType: 'arraybuffer'\r\n      }\r\n      } // end drm\r\n      } // end source\r\n      // tslint:disable-next-line:prefer-const\r\n      let videoplayer;\r\n      bitmovin(this.videoElement.nativeElement).setup(conf).then(function(playerInstance) {\r\n         console.log('Successfully created Bitmovin Player instance');\r\n       }, function(reason) {\r\n         console.log('Error while creating Bitmovin Player instance');\r\n       });`\r\n\r\nbitMovin version used \r\n\r\n> \"bitmovin-player\": \"^7.6.3\",\r\npl   "},"comment":{"url":"https://api.github.com/repos/bitmovin/bitmovin-player-web-samples/issues/comments/433783344","html_url":"https://github.com/bitmovin/bitmovin-player-web-samples/issues/14#issuecomment-433783344","issue_url":"https://api.github.com/repos/bitmovin/bitmovin-player-web-samples/issues/14","id":433783344,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzc4MzM0NA==","user":{"login":"PaulCheriyan009","id":12741667,"node_id":"MDQ6VXNlcjEyNzQxNjY3","avatar_url":"https://avatars2.githubusercontent.com/u/12741667?v=4","gravatar_id":"","url":"https://api.github.com/users/PaulCheriyan009","html_url":"https://github.com/PaulCheriyan009","followers_url":"https://api.github.com/users/PaulCheriyan009/followers","following_url":"https://api.github.com/users/PaulCheriyan009/following{/other_user}","gists_url":"https://api.github.com/users/PaulCheriyan009/gists{/gist_id}","starred_url":"https://api.github.com/users/PaulCheriyan009/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaulCheriyan009/subscriptions","organizations_url":"https://api.github.com/users/PaulCheriyan009/orgs","repos_url":"https://api.github.com/users/PaulCheriyan009/repos","events_url":"https://api.github.com/users/PaulCheriyan009/events{/privacy}","received_events_url":"https://api.github.com/users/PaulCheriyan009/received_events","type":"User","site_admin":false},"created_at":"2018-10-29T04:13:52Z","updated_at":"2018-10-29T04:13:52Z","author_association":"NONE","body":"Hi Srdjan,\r\n               Thank You for your help\r\n\r\nOn Tue, Oct 23, 2018 at 7:08 PM Srdjan Pajic <notifications@github.com<mailto:notifications@github.com>> wrote:\r\n\r\nHi Paul,\r\n\r\nI just tried and it works for me.\r\nHere are the steps I took:\r\n\r\n  *   Add it as dependancy to the project npm i bitmovin-player --save\r\n\r\n  *   bitmovin already has typescript definitions, so you can use it directly in angular. Here is an example of PlayerComponent (based on bitmovin tutorial found here: https://bitmovin.com/docs/player/quickstarts/get-started-with-the-bitmovin-player)\r\n\r\n`\r\nimport { Component, AfterViewChecked } from '@angular/core';\r\nimport { Player } from 'bitmovin-player';\r\n\r\n@component<https://github.com/component>({\r\nselector: 'app-player',\r\ntemplateUrl: './player.component.html'\r\n})\r\n\r\nexport class PlayerComponent implements AfterViewChecked {\r\nngAfterViewChecked() {\r\nsetTimeout(() => {\r\nconst container = document.getElementById('my-player');\r\nconst playerConfig = {\r\nkey: '945cf862-d48e-4f07-94a5-aeaa67969bfd'\r\n};\r\nconst source = {\r\ntitle: 'Getting Started with the Bitmovin Player',\r\ndescription: 'Now you are ready to embed the Bitmovin Player into your own website :)',\r\ndash: 'https://bitmovin-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd',\r\nhls: 'https://bitmovin-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8',\r\nprogressive: 'https://bitmovin-a.akamaihd.net/content/MI201109210084_1/MI201109210084_mpeg-4_hd_high_1080p25_10mbits.mp4',\r\nposter: 'https://bitmovin-a.akamaihd.net/content/MI201109210084_1/poster.jpg'\r\n};\r\nconst player = new Player(container, playerConfig); // const player = new bitmovin.player.Player(container, playerConfig);\r\nplayer.load(source).then(\r\nplay => {\r\nconsole.log('Successfully created Bitmovin Player instance')\r\n},\r\nreason => {\r\nconsole.log('Error while creating Bitmovin Player instance')\r\n}\r\n);\r\n}, 3000);\r\n}\r\n}`\r\n\r\nhtml code:\r\n<div id=\"my-player\"></div>\r\n\r\n—\r\nYou are receiving this because you authored the thread.\r\nReply to this email directly, view it on GitHub<https://github.com/bitmovin/bitmovin-player-web-samples/issues/14#issuecomment-432249355>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AMJsI_xF3net0eVhl4_mdzz-CRyQHamkks5unxu5gaJpZM4UEYLe>.\r\n"}}
{"actor":{"display_login":"PaulCheriyan009"}}