npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@bryandbor/zeality-testing-package-feb-1

v0.1.28

Published

ZealityVRPlayer

Downloads

14

Readme

Zeality VR Player

Table of contents

Demo

You can find a demo of Zeality VR Player here

Examples

Complete HTML Example

<!DOCTYPE html>
<html>
<head>
  <!-- Your files are normally here -->
  <link href="https://unpkg.com/@bryandbor/zeality-testing-package-feb-1/umd/main.css" rel="stylesheet">
</head>
<body>
  <div id="zeality-player-container"></div> <!-- you will need a container to load the player into -->
  
  <script type="text/javascript" src="https://unpkg.com/@bryandbor/zeality-testing-package-feb-1/umd/@bryandbor/zeality-testing-package-feb-1.min.js"></script>
  <script type="text/javascript">
    (function() {
      // This code will run after the page has finished loading all resources
      // Store a reference to the HTML element that will act as the container for the ZealityVRPlayer
      var container = document.getElementById('zeality-player-container');
      // Initialize the ZealityVRPlayer
      var player = new ZealityVRPlayer({
        api_key: 'YOUR_API_KEY_HERE',   // your unique API key
        src: 'PATH_TO_360_SOURCE.mp4',  // path to your 360 file source
        container: container            // a single html element that will act as the container for Zeality VR Player
      });
    })()
  </script>
</body>
<html>

After all resources have loaded, initialize Zeality VR Player. Simple Video Initialization

var container = document.getElementById('zeality-player-container');
var player = new ZealityVRPlayer({
  api_key: 'YOUR_API_KEY_HERE',   // your unique API key
  src: 'PATH_TO_360_SOURCE.mp4',  // path to your 360 file source
  container: container            // a single html element that will act as the container for Zeality VR Player
});

Simple Photo Initialization

var container = document.getElementById('zeality-player-container');
var player = new ZealityVRPlayer({
  api_key: 'YOUR_API_KEY_HERE',   // your unique API key
  src: 'PATH_TO_360_SOURCE.jpg',  // path to your 360 file source
  imageOnly: true,                // instructs the player to load a photo instead of a video
  container: container,           // a single html element that will act as the container for Zeality VR Player
});

All options that can be passed to Zeality VR Player at initialization

var container = document.getElementById('zeality-player-container');
var player = new ZealityVRPlayer({
  /* Required properties */
  api_key: 'YOUR_API_KEY_HERE',       // your unique API key
  src: 'PATH_TO_360_SOURCE.mp4',      // path to your 360 file source
  container: container,               // a signle html element that will act as the container for Zeality VR Player
  
  /* Optional properties */
  /* Image properties */
  imageOnly: false,                   // Source file will be image rather than video
  
  /* Video properties */
  autoplay: false,                    // Start playing automatically without requiring user interaction
  muted: false,                       // Start the video
  volume: 1,                          // Starting video volume (0-1)
  lat: 0,                             // Starting vertical offset (between -85 and 85)
  long: 0,                            // Starting horizontal offset (between -180 and 180)
  
  unsupportedBrowserMessage: 'Your browser doesn't support this 360 content',
    // unsupportedBrowserMessage will be displayed to the user when their browser
    // does not support the requested content
    
  unsupportedBrowserLink: {
    label: 'Check Out Our App',   // Text of a link to be displayed to the user
    link: 'http://www.zeality.co/a',// URL to direct users with unsupported browsers
  },
});

API

Player initialization

/*
* Start the ZealityVRPlayer and insert it into your document
* @param {Object} options
*   @options.property {HTML Element} container (required)
*   @options.property {String} api_key (required)
*   @options.property {String} src (optional)
*     @options.property {Bool} imageOnly (optional)
*     @options.property {Bool} autoplay (optional)
*     @options.property {Bool} muted (optional)
*     @options.property {Number: 0 - 1} volume (optional)
*     @options.property {Number: -85 - 85} lat (optional)
*     @options.property {Number: -180 - 180} long (optional)
*     @options.property {String} unsupportedBrowserMessage (optional)
*     @options.property {Object} unsupportedBrowserLink (optional)
*       @options.unsupportedBrowserLink.property {String} label
*       @options.unsupportedBrowserLink.property {String} link
* @return {ZealityVRPlayer} newly created ZealityVRPlayer
*/
var player = new ZealityVRPlayer(options);

Play/Pause Player

/*
* Play ZealityVRPlayer's Video Source
* @return {NULL} n/a
*/
player.play();

/*
* Pause ZealityVRPlayer's Video Source
* @return {NULL} n/a
*/
player.pause();

play()/pause() are ignored if ZealityVRPlayer is not displaying a video

Change Source

/*
* Change the ZealityVRPlayer content source
* @param {Object} options
*   @options.property {String} src (required)
*   @options.property {Bool} imageOnly (required)
* @return {NULL} n/a
*/
player.setSrc(options);

Browser Support

Video Streaming

|Browser | Version | Supported | |--- |--- |--- | |Chrome |37+ |Yes | |Safari |10+ |Yes | |Firefox |47+ |Yes | |Internet Explorer |- |No | |Edge |13+ |Yes | |Opera |- |No | |Mobile | | | |Mobile Safari (iOS) |- |No | |Mobile Chrome (iOS) |- |No | |Android Mobile Chrome|28+ |Yes |

Image Viewing

|Browser | Version | Supported | |--- |--- |--- | |Chrome |37+ |Yes | |Safari |10+ |Yes | |Firefox |47+ |Yes | |Internet Explorer |11+ |Yes | |Edge |13+ |Yes | |Opera |- |No | |Mobile | | | |Mobile Safari (iOS) |9 |Yes | |Mobile Chrome (iOS) |47 |Yes | |Android Mobile Chrome|28+ |Yes |