We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e14cda3 commit c8d11b5Copy full SHA for c8d11b5
packages/internal/utils/src/url-for-video.ts
@@ -38,6 +38,18 @@ export const transformVideoUrl = ({
38
).toString()}`
39
}
40
41
+ if (url?.match(/\/\/www.pornhub.com\/view_video.php\?viewkey=\w+/)) {
42
+ if (mini) {
43
+ return null
44
+ } else {
45
+ return `https://www.pornhub.com/embed/${url.match(/\/\/www.pornhub.com\/view_video.php\?viewkey=(\w+)/)?.[1]}?${new URLSearchParams(
46
+ {
47
+ autoplay: "1",
48
+ },
49
+ ).toString()}`
50
+ }
51
52
+
53
if (attachments) {
54
return attachments.find((attachment) => attachment.mime_type === "text/html")?.url ?? null
55
0 commit comments