Skip to content

Commit c1c69b9

Browse files
authored
Merge pull request #140 from Genymobile/integration/PLAYER-73-56-55-file-upload-gapps-and-replace-gulp
[Integration] [player-73] [player-56] [player-55] file upload + gapps + replace gulp by webpack
2 parents 31200f0 + 1875962 commit c1c69b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+10819
-11523
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,16 @@ A device renderer instance can be configured using the `options` argument (objec
478478
- **Details:**
479479
Enable or disable the fileUpload widget and drag & drop. This widget can be used to forward local file to the Android virtual device. When dragging & dropping APK or ZIP files, it will install them.
480480

481+
482+
#### gappsInstall <img align="right" src="./doc/assets/ic_installation.svg">
483+
484+
- **Type:** `Boolean`
485+
- **Default:** `true`
486+
- **Toolbar name:** `GAPPSInstall`
487+
- **Compatibility:** `PaaS`, `SaaS`
488+
- **Details:**
489+
Enable or disable the gappsInstall widget and drag & drop. This widget can be used to forward local apk to the Android virtual device or to install the gApps.
490+
481491
#### `fileUploadUrl`
482492

483493
- **Type:** `String`

example/geny-window.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ header {
190190
--gm-on-primary-variant-color: rgba(230, 25, 94, 1);
191191
--gm-secondary-color: #ffffff;
192192
--gm-on-secondary-color: #292929;
193-
--gm-secondary-variant-color: #f7f7f7;
193+
--gm-secondary-variant-color: #f7f7ff;
194194
--gm-on-secondary-variant-color: #1a1a1a;
195195
--gm-tertiary-color: #c4c4c44d;
196196
--gm-on-tertiary-color: #1a1a1a;

example/geny-window.html

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@
88
<script src="geny-window.js"></script>
99

1010
<!--load the player files -->
11-
<link
12-
rel="stylesheet"
13-
href="https://cdn.jsdelivr.net/npm/@genymotion/[email protected]/dist/css/device-renderer.min.css"
14-
/>
15-
<script src="https://cdn.jsdelivr.net/npm/@genymotion/[email protected]/dist/js/device-renderer.min.js"></script>
11+
<link rel="stylesheet" href="../dist/css/device-renderer.min.css" data-player-url />
12+
<script src="../dist/js/device-renderer.min.js" data-player-url></script>
1613

1714
<!--
18-
//to use maps option in gps widget you need to load google maps api and forward you google pai key
19-
<script src="https://maps.googleapis.com/maps/api/js?key=YOURGOOGLEAPIKEY" async defer></script>
20-
--></head>
15+
//to use maps option in gps widget you need to load google maps api and forward you google pai key
16+
<script src="https://maps.googleapis.com/maps/api/js?key=YOURGOOGLEAPIKEY" async defer></script>
17+
-->
18+
</head>
2119

2220
<body>
2321
<header>

example/geny-window.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const start = async (recipeUuid) => {
6969

7070
// init player
7171
const webrtcAddress = recipe.webrtc_url;
72-
initPlayer(webrtcAddress);
72+
initPlayer(webrtcAddress, recipe.file_upload_url);
7373
} catch (error) {
7474
snackbar(error);
7575
}
@@ -107,7 +107,7 @@ const startInstance = async (recipeUuid) => {
107107
};
108108

109109
// initPlayer
110-
const initPlayer = (webrtcAddress) => {
110+
const initPlayer = (webrtcAddress, fileUploadUrl = null) => {
111111
// clean up previous player if it exist, in order to avoid memories leaks
112112
if (playerInstance) {
113113
playerInstance.VM_communication.disconnect();
@@ -123,11 +123,14 @@ const initPlayer = (webrtcAddress) => {
123123
baseband: true,
124124
keyboardMapping: true,
125125
gpsSpeedSupport: true,
126+
fileUpload: fileUploadUrl ? true : false,
127+
fileUploadUrl: fileUploadUrl,
126128
toolbarOrder: [
127129
'ButtonsEvents_VOLUME_UP',
128130
'ButtonsEvents_VOLUME_DOWN',
129131
'ButtonsEvents_ROTATE',
130132
'separator',
133+
'GAPPSInstall',
131134
'Screenrecord',
132135
'Screenshot',
133136
'Battery',
@@ -231,7 +234,8 @@ const connectInstance = async (wsAddress) => {
231234
const instance = await response.json();
232235
instanceUuid = instance.uuid;
233236
await getJWTToken(instanceUuid);
234-
initPlayer(instance.publicWebrtcUrl);
237+
238+
initPlayer(instance.webrtc_url, instance.file_upload_url);
235239
};
236240

237241
const snackbar = (error) => {

gulp/graspify-squery.js

Lines changed: 0 additions & 42 deletions
This file was deleted.

gulp/gulp-template-collector.js

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)