9

I'm using chrome API and Default Media Receiver. Is it possible to use some parameters to display media on a portrait screen?

Deqing
  • 188
  • 1
  • 9

3 Answers3

3

Or this in the browser window:

javascript:document.body.style.setProperty("-webkit-transform", "rotate(90deg)", null);
Kyle Wiens
  • 664
  • 4
  • 11
2

you could do something like this:

body.portrait {
  -webkit-transform: rotate(90deg);
}

and then add the portrait class to the <body> via javascript with a cast message

pseidemann
  • 2,179
  • 2
  • 12
  • 21
1

Default receiver maintains the aspect ratio; if you have an image that its height is more than its width, it will be shown as such. Are you experiencing something different?

Ali Naddaf
  • 16,951
  • 2
  • 21
  • 28
  • Thanks, I mean when I rotate the screen physically to portrait (everything on screen should be rotated 90 degree), is there a place to set screen orientation on Chromecast or Chrome API? – Deqing Mar 14 '14 at 21:22
  • As long as you are using a Default/Styled receiver, it is up to you to pass a url of the image that you want, whether image is in portrait or landscape, etc is all notions that only make sense to you on your sender application; you send the url to the receiver and from that point on, receiver just shows the image for that url, with no change in orientation or aspect ratio. If you want a different orientation, or you want the orientation to change when you turn your phone, it is your sender's responsibility to build and send a new url that would reflect what you want on the TV's screen. – Ali Naddaf Mar 15 '14 at 02:42