I have a RubyMotion application that is completely portrait (no landscape), but loads BW::Media.play_modal
for an external MP4 video URL that I'd like to play in landscape mode.
It's loaded like this using RMQ, PM, and BW:
def on_load
rmq(@object).on(:tap) do
BW::Media.play_modal(@object.video_url)
end
end
I know how to enable autoRotate
for an entire screen/controller, but is there a way to force landscape mode only when the modal is played?
Thanks in advance for any help!
Here's how I ended up solving the problem-
landscape_left
and landscape_right
throughout the RM app.should_autorotate
method to false
throughout the app.modal?
method that set should_autorotate
to true when a modal was active.rmq.orientation.landscape?
method to set the view back to portrait as soon as the modal was exited.I hope this helps if anyone else has the same problem!