Skip to content

Commit

Permalink
add marker begin
Browse files Browse the repository at this point in the history
  • Loading branch information
wensheng-yan committed Jun 27, 2017
1 parent acf0dc0 commit c0a1244
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 6 deletions.
20 changes: 20 additions & 0 deletions src/scripts/Components/Marker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// @flow

import type { Player, MarkerSettings } from '../types';
import Component from './Component';

const defaults = {
duration: -1
};

class Marker extends Component{
constructor(player: Player, options: MarkerSettings){
super(player, options);
}

attachEvents(){

}
}

export default Marker;
4 changes: 3 additions & 1 deletion src/scripts/Panorama.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ export const defaults: Settings = {
Enable: true,
Message: "Please use your mouse drag and drop the video.",
HideTime: 3000,
}
},

Markers: []
};

/**
Expand Down
31 changes: 26 additions & 5 deletions src/scripts/types/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,31 @@ import { Point } from './Point';

export type VideoTypes = "equirectangular" | "fisheye" | "3dVideo" | "dual_fisheye";

export type NativePlayer = {
poster?: string;
controls?: boolean;
};
export type MarkerSettings = {
lat: number;
lon: number;
radius: number;

/**
* use custom dom
*/
element?: HTMLElement;

/**
* timeline when should marker be shown
*/
keyPoint: number;

/**
* when should marker disappear, set -1 if you don't want it disappear
*/
duration: number;

/**
* callback function when marker is disappear
*/
complete?: Function;
}

/**
* panorama settings options
Expand Down Expand Up @@ -113,7 +134,7 @@ export type Settings = {
HideTime?: number;
};

NativePlayer?: NativePlayer;
Markers?: MarkerSettings[],

ready?: Function;

Expand Down

0 comments on commit c0a1244

Please sign in to comment.