Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

Commit

Permalink
fix(embedding): Parses URL parameters also in embed mode
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-heimbuch committed Jun 5, 2018
1 parent c9dba2b commit b33297a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/embed/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,24 @@ import 'babel-polyfill'
import { urlParameters } from 'utils/url'
import remoteConfig from 'utils/request'

import { SET_PLAYBACK_PARAMS } from 'store/types'

import app from '../app'

remoteConfig(urlParameters.episode)
.then(config => ({ ...config, display: 'embed' }))
.then(app)
.then(() => {
console.log(window.STORE)
.then(() => window.PODLOVE_STORE)
.then(store => {
store.dispatch({
type: SET_PLAYBACK_PARAMS,
payload: urlParameters
})
return store
})
.catch(err => {
console.group(`Can't load Podlove Webplayer`)
console.error('config', urlParameters.episode)
console.error(err)
console.groupEnd()
})

/*
store.dispatch({
type: SET_PLAYBACK_PARAMS,
payload: urlParameters
})
return store
*/
1 change: 1 addition & 0 deletions src/statics/share.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
</head>
<body>
<PodlovePlayer></PodlovePlayer>
<script src="vendor.js"></script>
<script src="share.js"></script>
</body>
</html>

0 comments on commit b33297a

Please sign in to comment.