Skip to content

Instantly share code, notes, and snippets.

@mkezfarias
Last active February 18, 2020 06:09
Show Gist options
  • Save mkezfarias/b4a9170bbf3089da728069147e1f6cb2 to your computer and use it in GitHub Desktop.
Save mkezfarias/b4a9170bbf3089da728069147e1f6cb2 to your computer and use it in GitHub Desktop.
<% 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