/brightaction/src/com/brightcove/brightaction/model/CuePointTypeEnum.as

http://github.com/BrightcoveOS/BrightAction · 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. */
  18. package com.brightcove.brightaction.model {
  19. /**
  20. * An integer code corresponding to the type of cue point. One of 0 (AD), 1 (CODE), or
  21. * 2 (CHAPTER). An AD cue point is used to trigger mid-roll ad requests. A CHAPTER cue point
  22. * indicates a chapter or scene break in the video. A CODE cue point causes an event that you
  23. * can listen for and respond to.
  24. *
  25. * @author amanning
  26. */
  27. public class CuePointTypeEnum extends AbstractEnum {
  28. /**
  29. * Given the value representation of the enum, return an enum that matches that value
  30. *
  31. * @param value the value to lookup
  32. *
  33. */
  34. public static function createFromValue(value:Object):CuePointTypeEnum {
  35. return (AbstractEnum.createFromValue(value, LIST) as CuePointTypeEnum);
  36. }
  37. /** Ad cue point */
  38. public static const AD:CuePointTypeEnum = new CuePointTypeEnum(0);
  39. /** Code cue point */
  40. public static const CODE:CuePointTypeEnum = new CuePointTypeEnum(1);
  41. /** Chapter cue point */
  42. public static const CHAPTER:CuePointTypeEnum = new CuePointTypeEnum(2);
  43. /** A list of all available enum types, implemented by each sub-class for the lookup */
  44. private static const LIST:Array = [AD, CODE, CHAPTER];
  45. /** Class Constructor- initialize properties */
  46. public function CuePointTypeEnum(value:Number) {
  47. super(value);
  48. }
  49. }
  50. }