[nodebb-plugin-ns-embed] NS Embed
-
Yep correct...
The twitter rule doesn't work... -
As history tests, I am no reg-ex expert, but I've figured out a few monkey see monkey do style, but I'm a bit flummoxed with Odysee embeds.
This is the regex I'm using and that seems to work
Odysee Embeds
Watch:
(?:<a.*?)?(?:https?:\/\/)?(?:www\.)?odysee\.com\/@([a-zA-Z0-9_-]{1,64})([a-zA-Z0-9_-]{1,64}):([a-zA-Z0-9_-]{1,64})(?:.*?\/a>)?\/([a-zA-Z0-9_-]{1,64})([a-zA-Z0-9_-]{1,64}):([a-zA-Z0-9_-]{1,64})(?:.*?\/a>)?
Therefore I believe it's the embed that's floundering. The below is not doing the do - anyone?
Replace:
<div class='embed-wrapper'><div class='embed-container'><iframe id="odysee-iframe" width="560" height="315" src="https://odysee.com/@$1$2:$3/$4$5:$6" allowfullscreen></iframe></div></div>
... help!
-
for streamable link
<div class='embed-wrapper'><div class='embed-container'><iframe src="https://streamable.com/e/$1" frameborder="0" allowfullscreen></iframe></div></div>
(?:<a.?)?(?:https?://)?(?:www.)?(?:streamable.com/(?:(?:/e)?/))([a-zA-Z0-9_-]{2,12})(?:.*?/a>)?
-
for twitter, we can use 3rd to wrap the link in iframe then use that 3rd link, for example https://twitframe.com/:
watch:(?:<a.*?)?(?:https?:\/\/)?(?:twitter\.com)\/([^\/\"\s]*)\/status\/([^\/\"\s]*)(\/photo\/\d|)(?:.*?\/a>)?
replace:
<iframe border=0 frameborder=0 width="560" height="415"src="https://twitframe.com/show?url=https://twitter.com/$1/status/$2"></iframe>4
-
Is there a way to fix errors after plugin activation and make it work ?
My nodeBB V2.6.1, npm V8.19.2, OS Deb10 - plugin version 3.0.19Log:
2022-12-09T21:02:24.914Z [5217/6503] - warn: [plugins/nodebb-plugin-embed] The plugin.json field "library" is deprecated. Please use the package.json field "main" instead.
2022-12-09T21:02:24.917Z [5217/6503] - warn: [plugins] Unable to load library for: nodebb-plugin-embed
2022-12-09T21:02:24.918Z [5217/6503] - error: TypeError: winston.Logger is not a constructor
at /root/nodebb/node_modules/nodebb-plugin-embed/plugin/logger.js:9:22
at Object.<anonymous> (/root/nodebb/node_modules/nodebb-plugin-embed/plugin/logger.js:23:3)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Module.require (node:internal/modules/cjs/loader:1061:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/root/nodebb/node_modules/nodebb-plugin-embed/plugin/controller.js:4:18)
at Module._compile (node:internal/modules/cjs/loader:1159:14) -
-
@baris @julian whilst I know this is a third party plugin, is there any way we can make it work with v3?
9819.582fabab51cbadc1b17e.min.js:9 Uncaught (in promise) TypeError: window.app.alertSuccess is not a function at g.<anonymous> (9819.582fabab51cbadc1b17e.min.js:9:39786) at g.onack (admin.min.js?v=ittabjn5q0s:152:50547) at g.onpacket (admin.min.js?v=ittabjn5q0s:152:49660) at Q.emit (admin.min.js?v=ittabjn5q0s:152:60280) at admin.min.js?v=ittabjn5q0s:152:43160
I don't think @Nicolas is here much these days, but I could be wrong..
-
I search dailymotion rules for this plugin.
I've tested this but doesn't work
Dailymotion
Watch(?:<a.*?)?(?:https?:\\/\\/)?(?:www\\.)?dailymotion\\.com\\/video\\/([a-zA-Z0-9_-]{4,11})(?:.*?\\/a>)?
Replace
<div class='embed-wrapper'><div class='embed-container'><iframe src='//www.dailymotion.com/embed/video/$1' frameborder='0' allowfullscreen></iframe></div></div>
-
Sure, if you want but I prefer a rule for nsembed because I use ogproxy
-
@DownPW said in [nodebb-plugin-ns-embed] NS Embed:
I search dailymotion rules for this plugin.
I've tested this but doesn't work
Dailymotion
Watch(?:<a.*?)?(?:https?:\\/\\/)?(?:www\\.)?dailymotion\\.com\\/video\\/([a-zA-Z0-9_-]{4,11})(?:.*?\\/a>)?
Replace
<div class='embed-wrapper'><div class='embed-container'><iframe src='//www.dailymotion.com/embed/video/$1' frameborder='0' allowfullscreen></iframe></div></div>
Anyone ?
-
Is this plugin compatible with 3.x? Any active development as far as you can tell?