From d7e4387330d274c509f78239839ae42b1ba221b4 Mon Sep 17 00:00:00 2001 From: Brad Martin Date: Mon, 10 Jul 2017 15:02:54 -0500 Subject: [PATCH] closes #80 --- demo/package.json | 6 +++--- package.json | 11 ++++------- videoplayer.android.ts | 8 +++++--- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/demo/package.json b/demo/package.json index 2754b2c..f2afc42 100644 --- a/demo/package.json +++ b/demo/package.json @@ -5,20 +5,20 @@ "version": "3.0.0" }, "tns-android": { - "version": "3.0.1" + "version": "3.1.1" } }, "dependencies": { "nativescript-theme-core": "~1.0.2", "nativescript-videoplayer": "file:..", - "tns-core-modules": "^3.0.0" + "tns-core-modules": "^3.1.0" }, "devDependencies": { "babel-traverse": "6.24.1", "babel-types": "6.24.1", "babylon": "6.17.0", "lazy": "1.0.11", - "nativescript-dev-typescript": "~0.4.5", + "nativescript-dev-typescript": "~0.5.0", "typescript": "^2.2.2" } } diff --git a/package.json b/package.json index 212a27f..3fba16d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nativescript-videoplayer", - "version": "3.0.8", + "version": "3.0.9", "main": "videoplayer", "typings": "videoplayer.d.ts", "description": "A NativeScript plugin that uses the native video players to play local and remote videos.", @@ -20,10 +20,7 @@ "precommit": "lint-staged" }, "lint-staged": { - "*.ts": [ - "prettier --write", - "git add" - ] + "*.ts": ["prettier --write", "git add"] }, "repository": { "type": "git", @@ -38,7 +35,7 @@ "video player", "movie", "bradmartin", - "Thorum" + "nStudio" ], "contributors": [ { @@ -95,4 +92,4 @@ "tns-platform-declarations": "3.0.1", "typescript": "^2.2.2" } -} \ No newline at end of file +} diff --git a/videoplayer.android.ts b/videoplayer.android.ts index 2b46b39..d9f9872 100644 --- a/videoplayer.android.ts +++ b/videoplayer.android.ts @@ -1,5 +1,5 @@ -import common = require("./videoplayer-common"); -import videoSource = require("./video-source/video-source"); +import * as common from "./videoplayer-common"; +import * as videoSource from "./video-source/video-source"; import * as utils from "tns-core-modules/utils/utils"; import * as timer from "tns-core-modules/timer"; @@ -56,7 +56,7 @@ export class Video extends common.Video { this._setNativeVideo(value ? value.android : null); } - public initNativeView(): void { + public createNativeView(): any { let that = new WeakRef(this); this.nativeView = new android.view.TextureView(this._context); @@ -110,6 +110,8 @@ export class Video extends common.Video { } }) ); + + return this.nativeView; } public toggleMediaControllerVisibility(): void {