Code Monkey home page Code Monkey logo

Comments (4)

bradmartin avatar bradmartin commented on June 2, 2024

Can you share the project package.json, your code for how you're using the video player as well?

from nativescript-videoplayer.

JasonCavendish avatar JasonCavendish commented on June 2, 2024

Package.json

{
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "scripts": {
    "lint": "eslint \"app/**/*.js\""
  },
  "dependencies": {
    "@nativescript/core": "7.0.0",
    "@nativescript/theme": "2.5.0",
    "@nativescript/webpack": "3.0.0",
    "@progress-nativechat/nativescript-nativechat": "3.0.0",
    "kinvey-nativescript-sdk": "5.0.0",
    "nativescript-accelerometer": "3.0.0",
    "nativescript-background-http": "4.2.1",
    "nativescript-camera": "4.5.0",
    "nativescript-geolocation": "5.1.0",
    "nativescript-image": "2.2.5",
    "nativescript-imagepicker": "7.1.0",
    "nativescript-intl": "3.0.0",
    "nativescript-iqkeyboardmanager": "1.5.1",
    "nativescript-social-share": "1.5.2",
    "nativescript-theme-core": "1.0.6",
    "nativescript-ui-autocomplete": "6.0.0",
    "nativescript-ui-calendar": "6.0.0",
    "nativescript-ui-chart": "7.1.0",
    "nativescript-ui-dataform": "6.0.0",
    "nativescript-ui-gauge": "6.0.0",
    "nativescript-ui-listview": "8.0.1",
    "nativescript-ui-sidedrawer": "8.0.0",
    "nativescript-videoplayer": "^5.0.1"
  },
  "devDependencies": {
    "@nativescript/ios": "7.0.6",
    "@nativescript/types": "7.0.0"
  },
  "author": "",
  "main": "app.js"
}

Usage on Page object:
XML:

<Page class="modal-page" xmlns="http://schemas.nativescript.org/tns.xsd" 
    xmlns:VideoPlayer="nativescript-videoplayer" shownModally="onShownModally" unloaded="onNavigatedFrom">

	<DockLayout stretchLastChild="true">

        <AbsoluteLayout class="modal-stack" dock="top">

            <VideoPlayer:Video class="modal-video" id="nativeVideoPlayer" controls="false" autoplay="true" fill="false" top="0" 
left="0" height="100%" width="100%" src="{{ video }}" /> 

JS:

function onNavigatedFrom(args) {
    const video = args.object.getViewById('nativeVideoPlayer') ;
    video.pause();
}

Calling function:

function watchVideo(args) {
    console.log(args.object.bindingContext.video);

    const page = args.object.page;

    page.showModal(
        "./modal/modal",
        { 
          video: args.object.bindingContext.video
        },
        function closeCallback(result) { 
          if (result) {
            console.log("Result was: ", result);
          }
        },
        false // Full screen or not? (on iOS the modal is fullscreen irrespective of this value)
      );
}

Crashes when invoking showModal on the Page object.

from nativescript-videoplayer.

JasonCavendish avatar JasonCavendish commented on June 2, 2024

Too many issues to fix after upgrading to V7.
I'm going to use Swift to rebuild it from scratch unless there's a fix coming 🙄

from nativescript-videoplayer.

bradmartin avatar bradmartin commented on June 2, 2024

Not sure what the issue is :) hard to help. V7 was a major version with breaking changes.

If you have any errors or more info on what is broken with your update process I'd be happy to help guide you.

Looks like you might have some plugins/deps that need to be updated but I'm unsure.

from nativescript-videoplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.