I’m working with Angular 2 and I’m trying to implement twitter play card with audio.
I got two approaches , all fails
- All tags are hard coded eg.
meta content=‘text/html; charset=UTF-8’ http-equiv='Content-Type’
meta name=“twitter:card” content=“player"
meta name=“twitter:site” content=”@rchoi"
meta name=“twitter:title” content="Sample Player Card"
meta name=“twitter:description” content="This is a sample video. When you implement, make sure all links are secure."
meta name=“twitter:image” content="https://yoursite.com/example.png"
meta name=“twitter:player” content="https://yoursite.com/container.html"
meta name=“twitter:player:width” content="480"
meta name=“twitter:player:height” content="480"
meta name=“twitter:player:stream” content="https://yoursite.com/example.mp4"
meta name=“twitter:player:stream:content_type” content=“video/mp4”
and using the service I tried to push data to https://yoursite.com/container.html, but it gets ‘undefined’
-
All meta tags are creating dynamically with , i tried several options
- simple js
- using component with ngOninit() function
- in component’s Constructor
all fails.
Do you have any idea to make it works ?
Can I sent and receive data in container using twitter meta tags ?