/brightaction/src/com/brightcove/brightaction/model/CuePointTypeEnum.as
ActionScript | 63 lines | 14 code | 13 blank | 36 comment | 0 complexity | 75d9b97115df86c43278096b9f67b570 MD5 | raw file
1/** 2 * GNU General Public License v3 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a copy 5 * of this software and associated documentation files (the "Software"), to deal 6 * in the Software without restriction, including without limitation the rights 7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 * copies of the Software, and to permit persons to whom the Software is 9 * furnished to do so, subject to the following conditions: 10 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 11 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 12 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 13 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 14 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 15 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 16 * THE SOFTWARE. 17 */ 18package com.brightcove.brightaction.model { 19 20 /** 21 * An integer code corresponding to the type of cue point. One of 0 (AD), 1 (CODE), or 22 * 2 (CHAPTER). An AD cue point is used to trigger mid-roll ad requests. A CHAPTER cue point 23 * indicates a chapter or scene break in the video. A CODE cue point causes an event that you 24 * can listen for and respond to. 25 * 26 * @author amanning 27 */ 28 public class CuePointTypeEnum extends AbstractEnum { 29 30 /** 31 * Given the value representation of the enum, return an enum that matches that value 32 * 33 * @param value the value to lookup 34 * 35 */ 36 public static function createFromValue(value:Object):CuePointTypeEnum { 37 38 return (AbstractEnum.createFromValue(value, LIST) as CuePointTypeEnum); 39 40 } 41 42 /** Ad cue point */ 43 public static const AD:CuePointTypeEnum = new CuePointTypeEnum(0); 44 45 /** Code cue point */ 46 public static const CODE:CuePointTypeEnum = new CuePointTypeEnum(1); 47 48 /** Chapter cue point */ 49 public static const CHAPTER:CuePointTypeEnum = new CuePointTypeEnum(2); 50 51 /** A list of all available enum types, implemented by each sub-class for the lookup */ 52 private static const LIST:Array = [AD, CODE, CHAPTER]; 53 54 /** Class Constructor- initialize properties */ 55 public function CuePointTypeEnum(value:Number) { 56 57 super(value); 58 59 } 60 61 } 62 63}