| Revision 221,
833 bytes
checked in by jeroen, 4 years ago
(diff) |
|
tagged the 4.5 player
|
| Line | |
|---|
| 1 | /** |
|---|
| 2 | * Parse JWPlayer specific feed content into playlists. |
|---|
| 3 | **/ |
|---|
| 4 | package com.jeroenwijering.parsers { |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | import com.jeroenwijering.utils.Strings; |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | public class JWParser { |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | /** Prefix for the JW Player namespace. **/ |
|---|
| 14 | private static const PREFIX = 'jwplayer'; |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | /** |
|---|
| 18 | * Parse a feedentry for JWPlayer content. |
|---|
| 19 | * |
|---|
| 20 | * @param obj The XML object to parse. |
|---|
| 21 | * @param itm The playlistentry to amend the object to. |
|---|
| 22 | * @return The playlistentry, amended with the JWPlayer info. |
|---|
| 23 | * @see ASXParser |
|---|
| 24 | * @see ATOMParser |
|---|
| 25 | * @see RSSParser |
|---|
| 26 | * @see SMILParser |
|---|
| 27 | * @see XSPFParser |
|---|
| 28 | **/ |
|---|
| 29 | public static function parseEntry(obj:XML,itm:Object):Object { |
|---|
| 30 | for each (var i:XML in obj.children()) { |
|---|
| 31 | if(i.namespace().prefix == JWParser.PREFIX) { |
|---|
| 32 | itm[i.localName()] = Strings.serialize(i.text().toString()); |
|---|
| 33 | } |
|---|
| 34 | } |
|---|
| 35 | return itm; |
|---|
| 36 | } |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | } |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.