Last active
February 18, 2020 06:09
-
-
Save mkezfarias/b4a9170bbf3089da728069147e1f6cb2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% if @clicked %> | |
<script crossorigin src="https://unpkg.com/@daily-co/daily-js"></script> | |
<script> | |
if (window.innerWidth <= 400) { | |
callFrame = window.DailyIframe.createFrame({ | |
showLeaveButton: true, | |
iframeStyle: { | |
position: 'fixed', | |
bottom: 0, | |
width: '100%', | |
height: '100%' | |
} | |
}); | |
callFrame.join({ url: 'https://tutorial.daily.co/hello' }) | |
} else { | |
callFrame = window.DailyIframe.createFrame({ | |
showLeaveButton: true, | |
iframeStyle: { | |
position: 'fixed', | |
top: 0, | |
right: 0, | |
width: '50%', | |
height: '100%' | |
} | |
}); | |
callFrame.join({ url: 'https://tutorial.daily.co/hello' }) | |
} | |
</script> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment