AngularBigScreen is an Angular service to quickly use the HTML5 fullscreen API.
-
Install
angular-bigscreennode module through npm:npm install angular-bigscreen
-
Import
BigScreenModuleto your AppModuleimport { BigScreenModule } from 'angular-bigscreen'; @NgModule({ imports: [ BigScreenModule ] }) export class AppModule { }
-
Import
BigScreenServiceand use it in a componentimport { BigScreenService } from 'angular-bigscreen'; @Component({ selector: 'app-root', }) export class AppComponent { constructor(private bigScreenService: BigScreenService) { } }
For example:
// Request fullscreen
this.bigScreenService.request(this.elementRef.nativeElement);Returns a boolean. True if fullscreen is being used, else false.
Returns a boolean. Checks if fullscreen is enabled.
Requests fullscreen on an ElementRef.
Exits from fullscreen.
This is a wrapper for document.fullscreenchange.
This is a wrapper for document.fullscreenerror.
Returns an element. This is a wrapper for document.fullscreenElement.
MIT. Copyright (c) Alex.