Early Access
twitter:player:width
Specifies the width of the media player iframe for Twitter cards, ensuring an appropriate layout when shared on Twitter.
Code Examples
<meta name="twitter:player:width" content="435" />
<meta name="twitter:player:width" content="600" />
<meta name="twitter:player:width" content="300" />
<meta name="twitter:player:width" content="100%" />
Recommendations
- Optimize For Mobile and DesktopChoose a width that looks good on both desktop and mobile views to enhance user experience across devices. Common practice suggests a width of 435 pixels as a good starting point.
- Use With twitter:player:heightAlways define this meta tag in conjunction with twitter:player:height to ensure the aspect ratio of the embedded media remains constant, preventing layout shifts or distorted media playback.
Related Documentation
Related Meta Tags
Defines the iPhone app ID in the Apple App Store for deep linking from tweets. This is part of Twitter Cards used to enhance tweets with rich media to direct users to web content directly or through an app.
<meta name="twitter:app:id:iphone" content="307234931">
Specifies the unique application ID for a Google Play app, used within Twitter Cards to direct users to a specific Android app.
<meta name="twitter:app:id:googleplay" content="com.example.app">
Specifies the name of your Android app on the Google Play Store. This is utilized in Twitter Cards when you want to promote a mobile application directly from a tweet.
<meta name="twitter:app:name:googleplay" content="MyApp">
Defines the numeric ID of your iPad application in the Apple App Store, enabling Twitter to link to it when your content is shared.
<meta name="twitter:app:id:ipad" content="307234931">
Specifies the name of your application tailored for iPad users when sharing content on Twitter.
<meta name="twitter:app:name:ipad" content="My Amazing App">
Community