Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there enclosure for mp3, mp4 images ect ? #30

Closed
onigetoc opened this issue Jan 16, 2017 · 13 comments
Closed

Is there enclosure for mp3, mp4 images ect ? #30

onigetoc opened this issue Jan 16, 2017 · 13 comments

Comments

@onigetoc
Copy link

onigetoc commented Jan 16, 2017

Is there enclosure option or way to get mp3, mp4 images enclosures ?

also: get type and lenght

I tryed :

let extension = this._extractExtension(item, 'enclosure:');
    if (extension.attributes) {
      return extension.attributes.url;
    }
 }
@rla
Copy link
Owner

rla commented Jan 16, 2017

I'm not sure. I have not worked with feed extensions a lot. What does happen when you enable extensions : true, will those attributes appear? If possible give an URL with example feed or at least snippets.

@onigetoc
Copy link
Author

onigetoc commented Jan 16, 2017

Hi, you will see nothing special on the output but here my feed page.
https://github.com/onigetoc/feedrapp/blob/master/src/feed.js

Usualy, XML enclosure output like this.
<enclosure url="https://cdn.rt.com/files/2017.01/thumbnail/587d0965c3618885428b4603.jpg" type="image/jpeg" length="123"/>

@rla
Copy link
Owner

rla commented Jan 16, 2017

Since it does not contain a namespace, it's not recognized as an extension. Support needs to be explicitly added to extract it from RSS items. How familiar you are with C++?

@onigetoc
Copy link
Author

zero knowledge with C++
Only PHP and Javascript/jQuery

@rla
Copy link
Owner

rla commented Jan 16, 2017

Can there be multiple enclosure elements on an item. Spec is not clear on this. I think I could add support for these in this week.

@onigetoc
Copy link
Author

onigetoc commented Jan 16, 2017

i Think not. if i rememeber. if there's lot of item will be inside another tag like <medias>
http://www.therssweblog.com/?guid=20070522234541

@onigetoc
Copy link
Author

Finally, is it possible to get enclosure?

@rla
Copy link
Owner

rla commented Jan 17, 2017

Unfortunately I do not have time to implement it. I recommend to switch to a more feature-complete package.

@onigetoc
Copy link
Author

I think it's very important to make it work. It should not be so long for someone who programmed this script. one hour work max?

@rla
Copy link
Owner

rla commented Jan 17, 2017

That might be true but on this week I do not have that hour. Possibly on the next week. The Yahoo media extension should already work with the generic extension mechanism. The enclosure element needs to emit an object with the extracted attributes. This would be similar to the category code:

Local<Array> readCategoriesFromItemNode(const xml_node<char> *itemNode, std::vector<char*> &deallocate) {

The difference is that enclosure is just a single object.

@rla
Copy link
Owner

rla commented Jul 23, 2018

Attaching link to RSS spec: http://www.rssboard.org/media-rss#media-content
Seems like there is a big use case with podcasts.

@onigetoc
Copy link
Author

onigetoc commented Jul 24, 2018 via email

rla added a commit that referenced this issue Aug 4, 2018
@rla
Copy link
Owner

rla commented Aug 4, 2018

Released 1.6.0. Refer to https://github.com/rla/fast-feed#enclosure regarding the enclosure support.

Media extension support is put into a separate issue and will likely be done through nested extension parsing.

@rla rla closed this as completed Aug 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants