-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding an example folder with a wrapper for the player
- Loading branch information
Showing
7 changed files
with
574 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
/* Variables */ | ||
:root { | ||
--primaryColor: #e6195e; | ||
--errorColor: #dc3545; | ||
--errorBgColor: #f8d7da; | ||
} | ||
|
||
/* CSS helper */ | ||
.mb-3 { | ||
margin-bottom: 15px; | ||
} | ||
|
||
/* global */ | ||
* { | ||
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; | ||
} | ||
h3 { | ||
font-family: sans-serif; | ||
font-weight: 300; | ||
} | ||
|
||
a { | ||
color: #fff; | ||
text-decoration: none; | ||
} | ||
|
||
a:hover { | ||
color: var(--primaryColor); | ||
} | ||
|
||
ul { | ||
padding: 5px 15px; | ||
} | ||
hr { | ||
color: var(--primaryColor); | ||
width: 100%; | ||
} | ||
|
||
.note { | ||
font-size: 14px; | ||
color: #110f0f; | ||
background-color: #fffacd; | ||
margin-bottom: 20px; | ||
line-height: 1.4; | ||
padding: 5px 10px; | ||
border-radius: 2px; | ||
} | ||
|
||
#snackbar { | ||
visibility: hidden; | ||
min-width: 250px; | ||
background-color: var(--errorBgColor); | ||
color: var(--errorColor); | ||
text-align: center; | ||
margin: 0 auto; | ||
height: auto; | ||
border-radius: 5px; | ||
display: flex; | ||
padding: 5px 15px; | ||
align-items: center; | ||
width: auto; | ||
flex-grow: 1; | ||
margin: 0px 100px; | ||
} | ||
#snackbar.show { | ||
visibility: visible; | ||
} | ||
/* Page */ | ||
body { | ||
margin: 0; | ||
background: #000; | ||
display: flex; | ||
flex-direction: column; | ||
height: 100vh; | ||
} | ||
|
||
header { | ||
padding: 10px 0; | ||
background-color: #1e1e1e; | ||
display: flex; | ||
justify-content: flex-start; | ||
} | ||
|
||
#logo { | ||
height: 64px; | ||
min-width: 225px; | ||
background-size: contain; | ||
background-repeat: no-repeat; | ||
background-image: url('./logo.png'); | ||
margin: 0 0 0 10px; | ||
flex-grow: 0; | ||
} | ||
|
||
#main { | ||
display: flex; | ||
flex-grow: 1; | ||
position: relative; | ||
} | ||
|
||
#sidebar { | ||
display: flex; | ||
flex-direction: column; | ||
min-width: 300px; | ||
max-width: 300px; | ||
background-color: #1e1e1e; | ||
color: #fff; | ||
padding: 10px; | ||
box-sizing: border-box; | ||
margin-right: 20px; | ||
padding-top: 20px; | ||
} | ||
|
||
#sidebar .actions { | ||
display: flex; | ||
justify-content: space-around; | ||
} | ||
|
||
#sidebar .actions > button { | ||
width: 30px; | ||
height: 30px; | ||
cursor: pointer; | ||
} | ||
|
||
#player { | ||
background-color: #000; | ||
color: #fff; | ||
padding: 10px; | ||
box-sizing: border-box; | ||
margin-right: 20px; | ||
margin: 0 auto; | ||
max-width: 90%; | ||
max-height: 95vh; | ||
} | ||
|
||
#fe-player { | ||
margin: 10px; | ||
margin: 0; | ||
color: #fff; | ||
font-size: 14px; | ||
font-family: 'Roboto', sans-serif; | ||
} | ||
|
||
#fe-player .gm-wrapper { | ||
display: flex !important; | ||
} | ||
|
||
#fe-player .gm-toolbar { | ||
top: 0; | ||
height: 100%; | ||
background-color: #1e1e1e; | ||
} | ||
|
||
@media screen and (max-width: 800px) { | ||
#fe-player.landscape { | ||
max-width: 400px; | ||
width: auto; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>geny SaaS example</title> | ||
<meta http-equiv="content-type" content="text/html;charset=utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link rel="stylesheet" href="geny-window.css" /> | ||
<script src="geny-window.js"></script> | ||
|
||
<!--load the player files --> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/@genymotion/[email protected]/dist/css/device-renderer.min.css" | ||
/> | ||
<script src="https://cdn.jsdelivr.net/npm/@genymotion/[email protected]/dist/js/device-renderer.min.js"></script> | ||
|
||
<!-- | ||
//to use maps option in gps widget you need to load google maps api and forward you google pai key | ||
<script src="https://maps.googleapis.com/maps/api/js?key=YOURGOOGLEAPIKEY" async defer></script> | ||
--></head> | ||
|
||
<body> | ||
<header> | ||
<a href="https://www.genymotion.com/" target="_blank" id="logo"></a> | ||
<div id="snackbar"></div> | ||
</header> | ||
|
||
<div id="main"> | ||
<div id="sidebar"> | ||
<h3>Start a new instance</h3> | ||
<input type="password" id="apiToken" placeholder="Your Api Token" value="" /> | ||
<a href="https://www.genymotion.com/blog/api-tokens-for-genymotion-saas/" target="_blank" class="mb-3"> | ||
👉 How to get an API token | ||
</a> | ||
|
||
<input type="text" id="recipeUuid" placeholder="Recipe uuid" class="mb-3" /> | ||
|
||
<div> | ||
☝️ Recipe uuid from <a href="https://cloud.geny.io/recipes" target="_blank"> SaaS </a> | ||
or | ||
<a href="https://docs.genymotion.com/gmsaas/03_Commands/#list-recipes" target="_blank"> gmsaas </a> | ||
</div> | ||
<div class="mb-3">👇 Or Select a device from here</div> | ||
<select id="listRecipes" class="mb-3" place> | ||
<option value="" selected disabled>No recipes fetched, give a valid api token</option> | ||
</select> | ||
<div class="actions mb-3"> | ||
<button id="start">▶</button> | ||
<button id="stop">⏹</button> | ||
</div> | ||
<hr /> | ||
<h3>Connect to an existing instance</h3> | ||
<input | ||
type="text" | ||
id="wsAddress" | ||
placeholder="Instance uuid or Websocket address" | ||
value="" | ||
class="mb-3" | ||
/> | ||
<div class="note" id="input-note"> | ||
<ul> | ||
<li><strong>Instance uuid:</strong> the uuid of a launched device.</li> | ||
<li> | ||
<strong>Websocket address:</strong> a WebSocket address (starting with "wss://") of a | ||
launched device. | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="actions"> | ||
<button id="connectExistingInstance">🔌</button> | ||
</div> | ||
</div> | ||
<div id="player"> | ||
<div id="fe-player"></div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.