How to choose node js version?


#1

How to choose node js version for ionic latest version for video streaming App.?


#2

Go for the latest. Now 9.3.0 is available. Try that


#3

tslint: C:/mediaStreaming/src/pages/home/home.ts, line: 2
All imports are unused.

L1: import { Component } from ‘@angular/core’;
L2: import { NavController } from ‘ionic-angular’;
L3: import { StreamingMedia, StreamingVideoOptions, StreamingAudioOption
s } from ‘@ionic-native/streaming-media’;

I got this error while i run ionic serve comment and also video doesn’t play… Any solution there.


#4

This is not an error. Just a warning that you are not using the headers in your Component. Share your ts file


#5

Which file i would share? app.html or full folder?


#6

Please share your home.html and home.ts


#7
Media Streaming Start Video

import { Component } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;
import { StreamingMedia, StreamingVideoOptions } from ‘@ionic-native/streaming-media’;

@Component({
selector: ‘page-home’,
templateUrl: ‘home.html’
})
export class HomePage {

constructor(private streamingMedia: StreamingMedia) { }

startVideo() {
let options: StreamingVideoOptions = {
successCallback: () => { console.log(‘Finished Video’) },
errorCallback: (e) => { console.log('Error: ', e) },
orientation: ‘portrait’
};

// http://www.sample-videos.com/
this.streamingMedia.playVideo('http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_30mb.mp4', options);

}

}


#8

Code is fine only. Hope you added the plugin in app.module.ts also.

If yes, it should work when the startVideo() function is called.

Try restarting your server and check. Better to check in device/emulator than checking in browser


#9

okay i will try… thank… need one more help?


#10

Post as a new topic if you have any other help


#11

okay i will add new topic of it


#12

Use the most recent LTS. Unless you program in Node, you don’t need track 9.


#13

If you are on Windows, ionic won’t even work with newest Node 9, Node LTS should be used.