Skip to content

Commit

Permalink
refactor: use smashystream for streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
pulkitpareek18 committed Aug 17, 2023
1 parent d3160cc commit ac2e8f6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Open the project directory and run `index.html`.
- [Pace.js](https://codebyzach.github.io/pace/e.com/project/elangosundar/awesome-README-templates)
- IMDB
- TMDB
- Stream Embed
- Smashy Stream
- [CORS-Proxy](https://corsproxy.io)


Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<div id="video" class="video">
<iframe id="iframe" scrolling="no" src="" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<p style="color: rgb(79, 221, 221); font-weight: 500;">In case of any Error or Too Much Buffering click again on
your Movie poster down below or just change the Server from the left corner in video player. </p>
your Movie poster down below or just change the Player from the right corner in video player. </p>
<!-- ShareThis BEGIN --><div class="sharethis-inline-share-buttons"></div><!-- ShareThis END -->
<div id="webSeriesData"></div>
</div>
Expand Down Expand Up @@ -118,7 +118,7 @@ <h3>Conclusion</h3>

<h3>Libraries Used</h3>
<div class="footerLinks">
<a href="https://streamembed.stream" target="_blank">Stream-Embed</a>
<a href="https://embed.smashystream.com/" target="_blank">Smashy Stream</a>
<a href="https://codebyzach.github.io/pace/" target="_blank">PACE</a>
<a href="https://tmdb.com" target="_blank">TMDB</a>
<a href="https://imdb.com" target="_blank">IMDB</a>
Expand Down
10 changes: 5 additions & 5 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ function fetchAndShow() {
let imageAndInfo = "";

if (result.qid === "movie" && result.i) {
imageAndInfo = `<a onClick="setUrl(this); return setVideo(this);" url="imdb=${result.id}&type=movie&title=${result.l.replace(/ /g, "_")}" isWebSeries="false" title="${result.l}" class="links" IMDB="${result.id}" href="https://multiembed.mov/directstream.php?video_id=${result.id}" target="_blank">
imageAndInfo = `<a onClick="setUrl(this); return setVideo(this);" url="imdb=${result.id}&type=movie&title=${result.l.replace(/ /g, "_")}" isWebSeries="false" title="${result.l}" class="links" IMDB="${result.id}" href="https://embed.smashystream.com/playere.php?imdb=${result.id}" target="_blank">
<img alt="${result.l}" src="${optimisedImageUrl(result.i.imageUrl)}">
<div class="info">
<h3>${result.l}</h3>
<p>${result.s}</p>
</div>
</a>`;
} else if (result.qid === "tvSeries" && result.i) {
imageAndInfo = `<a onClick="setUrl(this); return setVideo(this);" url="imdb=${result.id}&season=1&episode=1&title=${result.l.replace(/ /g, "_")}" IMDB="${result.id}" title="${result.l}" isWebSeries="true" class="links" href="https://multiembed.mov/directstream.php?video_id=${result.id}&s=1&e=1" target="_blank">
imageAndInfo = `<a onClick="setUrl(this); return setVideo(this);" url="imdb=${result.id}&season=1&episode=1&title=${result.l.replace(/ /g, "_")}" IMDB="${result.id}" title="${result.l}" isWebSeries="true" class="links" href="https://embed.smashystream.com/playere.php?imdb=${result.id}&season=1&episode=1" target="_blank">
<img alt="${result.l}" src="${optimisedImageUrl(result.i.imageUrl)}">
<div class="info">
<h3>${result.l}</h3>
Expand Down Expand Up @@ -88,7 +88,7 @@ function setAll(imdb, title, season, episode, type) {
a.setAttribute("title", title);
a.setAttribute("class", "links");
a.setAttribute("IMDB", imdb);
a.setAttribute("href", " https://multiembed.mov/directstream.php?video_id=" + imdb);
a.setAttribute("href", " https://embed.smashystream.com/playere.php?imdb=" + imdb);
a.setAttribute("target", "_blank");
a.click();
} else if (imdb && title && episode && !type) {
Expand All @@ -103,7 +103,7 @@ function setAll(imdb, title, season, episode, type) {
a.setAttribute("IMDB", imdb);
a.setAttribute(
"href",
`https://multiembed.mov/directstream.php?video_id=${imdb}&s=${season}&e=${episode}`
`https://embed.smashystream.com/playere.php?imdb=${imdb}&season=${season}&episode=${episode}`
);
a.setAttribute("target", "_blank");
a.click();
Expand Down Expand Up @@ -337,7 +337,7 @@ function setVideo(element) {
minimumIntegerDigits: 2,
useGrouping: false,
});
episodesData += `<a class="episodes" title="${seasonsDataJSON.name + ": E" + formatedEpisodeNumber + ". " + episode.name}" cssidentification="s${seasonNumber}e${episodeNumber}" url="imdb=${imdbID}&season=${seasonNumber}&episode=${episodeNumber}&title=${seasonsDataJSON.name.replace(/ /g, "_") + "_E" + formatedEpisodeNumber + "_" + episode.name.replace(/ /g, "_")}" onClick="event.preventDefault();setVideo(this);setUrl(this); " href="https://multiembed.mov/directstream.php?video_id=${imdbID}&s=${seasonNumber}&e=${episodeNumber}">E${formatedEpisodeNumber}. ${episode.name}</a>`;
episodesData += `<a class="episodes" title="${seasonsDataJSON.name + ": E" + formatedEpisodeNumber + ". " + episode.name}" cssidentification="s${seasonNumber}e${episodeNumber}" url="imdb=${imdbID}&season=${seasonNumber}&episode=${episodeNumber}&title=${seasonsDataJSON.name.replace(/ /g, "_") + "_E" + formatedEpisodeNumber + "_" + episode.name.replace(/ /g, "_")}" onClick="event.preventDefault();setVideo(this);setUrl(this); " href="https://embed.smashystream.com/playere.php?imdb=${imdbID}&season=${seasonNumber}&episode=${episodeNumber}">E${formatedEpisodeNumber}. ${episode.name}</a>`;
}

episodeContainer.innerHTML = episodesData;
Expand Down
Loading

0 comments on commit ac2e8f6

Please sign in to comment.